Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MORE FUN WITH HARDWARE AND CIRCUITPYTHON - IOT,...

MORE FUN WITH HARDWARE AND CIRCUITPYTHON - IOT, WEARABLES, AND MORE!

PyCon US 2021 Remote

Learn about programming hardware with Python and advanced uses of CircuitPython by walking through exciting demos of real-world projects in action. Advanced components like buttons, sensors, and screens bump up the fun and the interactivity of your project. Level-up your hardware skills in this fast-paced talk!

CircuitPython is the education-friendly fork of MicroPython that's been steadily rising in popularity as new releases increase stability, reliability, and speed. CircuitPython allows Python enthusiasts to quickly learn about hardware projects without having to learn something completely brand new. Given the rise in popularity, the Python community is quickly becoming familiar with the basics of CircuitPython. In fact, all attendees of PyCon US in 2019 were given a CircuitPython-compatible CircuitPlayground Express device with LEDs, speakers, sensors, and more, all usable without the need of learning to solder.

If you're interested in doing more with hardware, this talk will point you in the right direction of where to go next. We'll start with choosing the right device for the scope of your project. Next, we'll scratch the surface of working with electronics -- what's a circuit? What are good resources for learning to solder? Lastly, I'll cover topics such as IoT, wearables, and adding interactivity to your projects with sensors, buttons, and switches with live demos of real-world projects I've created, along with sharing the build process and code for each.

Viewers will finish the talk feeling confident about continuing their hardware journey across a range of project types.

Nina Zakharenko

May 15, 2021
Tweet

More Decks by Nina Zakharenko

Other Decks in Technology

Transcript

  1. --- NINA ZAKHARENKO --- MORE FUN WITH CIRCUITPYTHON --- IOT,

    WEARABLES, & MORE! --- @NNJA nina.to/pycon2021
  2. GO BEYOND THE BASICS *tip: watch Light Up Your Life,

    With Python and LEDs nina.to/pycon2019 @nnja • nina.to/pycon2021
  3. NEXT TOPICS ‣ Wearables ‣ Interactivity - Sensors, Screens, Graphics

    ‣ Bluetooth connectivity ‣ Internet of Things (IoT) ⠀ @nnja • nina.to/pycon2021
  4. CHOOSING A DEVICE & COMPONENTS ‣ IoT? -> Need Wifi

    ‣ Sensors? ‣ Size (for wearables) ‣ Raspberry Pi ‣ Soldering needed? ⠀ @nnja • nina.to/pycon2021
  5. LEARN ABOUT ELECTRONICS ‣ Basic concepts ‣ Units of measurement

    ‣ Circuits ‣ Voltage, Current, Resistance and Ohm’s Law High-level overview: SparkFun engineering essentials ⠀
  6. BREADBOARDS ‣A no-solder way to connect components ‣use jumper wires

    ‣ ✅ reuse components ‣ ✅ prototype & test the circuit ‣components need leads (can buy some pre-attached) ‣use fritzing app to diagram How to Breadboard Video, Sparkfun Breadboard Guide
  7. ADD INTERACTIVITY ‣ Buttons ‣ Potentiometers (knobs) ‣ Switches ‣

    Sensors (temperature, air quality, sound, lots more!) ⠀ @nnja • nina.to/pycon2021
  8. ADD CONNECTIVITY ‣ WiFi enabled ‣ Bluetooth ‣ Radio ‣

    API calls ‣ Triggers ⠀ @nnja • nina.to/pycon2021
  9. SOCIAL BATTERY LED LANYARD ‣ Select a social battery from

    the touch screen menu ‣ LEDs change color, depending on selection. ⠀ @nnja • nina.to/pycon2021
  10. while True: touch = pyportal.touchscreen.touch_point if touch: for button in

    buttons: if button.contains(touch): if button.name in status_backgrounds: back_button_group.hidden = False button_group.hidden = True social_status_label.hidden = True pyportal.set_background(status_backgrounds[button.name]) pixel_pattern.color = button.fill_color git.io/socialbattery
  11. BLUETOOTH CONTROLLED LED JACKET ‣Based on a design by Sophy

    Wong ‣Change colors, patterns, & more from my phone or watch! ‣nRF52 Feather + battery in small package @nnja • nina.to/pycon2021
  12. ble = BLERadio() uart_service = UARTService() advertisement = ProvideServicesAdvertisement(uart_service) while

    True: ble.start_advertising(advertisement) while ble.connected: animation_sequence.animate() if uart_service.in_waiting: # Get a Bluetooth Packet if one is sent packet = Packet.from_stream(uart_service) if isinstance(packet, ColorPacket): selected_color = packet.color if isinstance(packet, ButtonPacket): if packet.pressed: if packet.button == ButtonPacket.RIGHT: animation_sequence.next() print( "Selecting next animation: ", animation_sequence.current_animation.__class__.__name__, ) code: git.io/ledjacket
  13. FOLLOW AWESOME MAKERS Odd Jayy Becky Stern Sophy Wong Geek

    Mom Projects Stargirl Flowers Noé Ruiz & Pedro Ruiz & so many more!
  14. PROGRAMMABLE LED BAGS ‣by Geek Mom Projects / BrightWearables ‣supports

    microbit + MicroPython ‣or Adafruit CLUE + CircuitPython (with Bluetooth!) ‣transparent window for display @nnja • nina.to/pycon2021
  15. GUIDES / HELP ‣ Instructables ‣ Sparkfun ‣ Adafruit Learn

    Guides ‣ Adafruit Discord (CircuitPython Channel) ‣ Hackaday (advanced) ⠀ @nnja • nina.to/pycon2021
  16. CREDITS ‣ Twitch icon and Twitter icon icon by Icons8

    ‣ Photo by Stephen Kong on Unsplash @nnja • nina.to/pycon2021