Raspberry Pi Pico W LESSON 61: How to Write Modular Code With Micropython Functions

preview_player
Показать описание
You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:

In this class we will be using the Sunfounder Raspberry Pi Pico W Keppler Kit. It will make things a lot easier if we are working on identical hardware. the link below is to amazon, and is for the identical hardware I will be using in this entire class.

In this video, I will show you how to write modular code in micropython using functions. We will look at how to pass values to and from functions, and examine good programming techniques.

#raspberrypipicow
#micropython
#functions
Рекомендации по теме
Комментарии
Автор

U tought us this in python lesson... Class, methods, threading. ❤

pralaymajumdar
Автор

Thanks Paul! A review never hurts : ) got to lose old habits...

edSabio
Автор

Thanks Paul. It was interesting to write the sort code without looking for answers first. The way I did it was to write the function to find the max value and to return it and its position in the list. I then saved the max value in a different list and set it to 0 in the initial list. I'd do this as many times as the length of the list and each time it would return the next max value. Worked OK but not how the actual sort() library works! Still fun to use both sides of the brain.

Dr_Phil-vuwn
Автор

Hey Paul. Can you drop a link to your coffee cup, so we can all truly have the same identical hardware? 😂

kevindadams
Автор

I think there is an error in the perimeter equation in the def. rectsolv(len, wid): It says perimeter = 2*len +2*w. shouldn't it be 2*len+2*wid?

hibstar
Автор

i13:30 n rectSolve you used w in perimeter, not wid. why did that work?

TheUnofficialMaker
Автор

Hello
Can you afford us a tutorial how to connect beagle bone black with other board through uart
& thank you

hanzoulisalma
Автор

Is library then a large complex function?

kenkoknz
Автор

Hey, Paul! I posted my HW, and posted a comment twice, but it is not here.

DrDave
Автор

I posted my homework on my channel. I cannot give a link because it disappears when I go back to your video, the comment is gone.

jameslewellen
Автор


The free form nature of python is a blessing & a curse. I discovered that, if you need to accomplish the element swapping in one line, this code actually works
array[i], array[i+1] = array[i+1], array[i]
My Fortran teachers must be rolling over in their graves!

briankelly