Functions & Global Variables | Raspberry Pi Pico Workshop: Chapter 3.6
Core Electronics 14:58
2,673 views · 71 likes Watch on YouTube ↗
🔗 *The full course* : _https://core-electronics.com.au/courses/raspberry-pi-pico-workshop/_
In this video, we are going to learn all about *functions* in *MicropPython* . Functions are just a way of storing a piece of code away, giving it a name, and then running that code when we call its name. This is a great tool to use when we have sections of *code* that need to be *repeated*. We will also be covering some tricky caveats when dealing with functions, namely; parameters, arguments, and *local and global variables*.
🔧🔨🧰 Hardware featured in this guide:
*Raspberry Pi Pico:*
_https://core-electronics.com.au/catalog/product/view/sku/CE08704_
*The Pico Variants:*
_https://core-electronics.com.au/raspberry-pi/pico.html#category_2118_
💡❓ If you have any questions about this content or want to share a project you're working on head over to our *maker forum:* _http://coreelec.io/forum_
0:00 What are Functions?
1:06 Flashing SOS with a Function
3:10 Passing Information In and Out of Functions
7:00 Local and Global Variables
9:50 Moving Filter Example
13:54 When to Use Functions
🌏🦘 *Core Electronics* is located in the heart of Newcastle, Australia. We're powered by makers, for makers. Drop by if you are looking for:
• *Raspberry Pi* _https://core-electronics.com.au/raspberry-pi.html_
• *Arduino* _https://core-electronics.com.au/arduino.html_
• *Sparkfun* _https://core-electronics.com.au/brands/sparkfun-australia_
• *Adafruit* _https://core-electronics.com.au/brands/adafruit-australia_
• *Pololu* _https://core-electronics.com.au/brands/pololu-australia_
• *DFRobot* _https://core-electronics.com.au/brands/dfrobot-australia_
The following trademarks are owned by *Core Electronics Pty Ltd:*
"Core Electronics" and the Core Electronics logo
"Makerverse" and the Makerverse logo
"PiicoDev" and the PiicoDev logo
"GlowBit" and the GlowBit logo
In this video, we are going to learn all about *functions* in *MicropPython* . Functions are just a way of storing a piece of code away, giving it a name, and then running that code when we call its name. This is a great tool to use when we have sections of *code* that need to be *repeated*. We will also be covering some tricky caveats when dealing with functions, namely; parameters, arguments, and *local and global variables*.
🔧🔨🧰 Hardware featured in this guide:
*Raspberry Pi Pico:*
_https://core-electronics.com.au/catalog/product/view/sku/CE08704_
*The Pico Variants:*
_https://core-electronics.com.au/raspberry-pi/pico.html#category_2118_
💡❓ If you have any questions about this content or want to share a project you're working on head over to our *maker forum:* _http://coreelec.io/forum_
0:00 What are Functions?
1:06 Flashing SOS with a Function
3:10 Passing Information In and Out of Functions
7:00 Local and Global Variables
9:50 Moving Filter Example
13:54 When to Use Functions
🌏🦘 *Core Electronics* is located in the heart of Newcastle, Australia. We're powered by makers, for makers. Drop by if you are looking for:
• *Raspberry Pi* _https://core-electronics.com.au/raspberry-pi.html_
• *Arduino* _https://core-electronics.com.au/arduino.html_
• *Sparkfun* _https://core-electronics.com.au/brands/sparkfun-australia_
• *Adafruit* _https://core-electronics.com.au/brands/adafruit-australia_
• *Pololu* _https://core-electronics.com.au/brands/pololu-australia_
• *DFRobot* _https://core-electronics.com.au/brands/dfrobot-australia_
The following trademarks are owned by *Core Electronics Pty Ltd:*
"Core Electronics" and the Core Electronics logo
"Makerverse" and the Makerverse logo
"PiicoDev" and the PiicoDev logo
"GlowBit" and the GlowBit logo
Category (YouTube): Education
Playback is via YouTube's official embedded player. Data from YouTube; Exumo is not affiliated with YouTube.