For Loops & Lists | Raspberry Pi Pico Workshop: Chapter 3.4
π *The full course* : _https://core-electronics.com.au/courses/raspberry-pi-pico-workshop/_ *For loops* are one of the two types of loops we can use in *MicroPython*, and are designed to be looped a set and *known amount* of times, executing the code placed inside of them on every loop. In this video we will be learning how to use the loop function in conjunction with the *range function* to loop over a range of numbers, and *lists* to loop over a custom range of numbers or strings. π§π¨π§° 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 For vs While Loops 0:33 Looping a Set Number of Times 1:53 Looping Over a Range 2:45 Servo Sweep Example 4:55 Lists and Loops 6:45 3 Key Takeaways ππ¦ *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
Download
0 formatsNo download links available.