Slide 1

Slide 1 text

--- NINA ZAKHARENKO --- MORE FUN WITH CIRCUITPYTHON --- IOT, WEARABLES, & MORE! --- @NNJA nina.to/pycon2021

Slide 2

Slide 2 text

@NNJA NNJA.IO @NNJAIO nina.to/pycon2021

Slide 3

Slide 3 text

WHY PYTHON ON HARDWARE? @nnja • nina.to/pycon2021

Slide 4

Slide 4 text

WHY CIRCUITPYTHON? ‣python variant for microcontrollers ‣education friendly ‣open source! ‣ ! awesome community !

Slide 5

Slide 5 text

GO BEYOND THE BASICS *tip: watch Light Up Your Life, With Python and LEDs nina.to/pycon2019 @nnja • nina.to/pycon2021

Slide 6

Slide 6 text

NEXT TOPICS ‣ Wearables ‣ Interactivity - Sensors, Screens, Graphics ‣ Bluetooth connectivity ‣ Internet of Things (IoT) ⠀ @nnja • nina.to/pycon2021

Slide 7

Slide 7 text

CHOOSING A DEVICE & COMPONENTS ‣ IoT? -> Need Wifi ‣ Sensors? ‣ Size (for wearables) ‣ Raspberry Pi ‣ Soldering needed? ⠀ @nnja • nina.to/pycon2021

Slide 8

Slide 8 text

CONCEPTS @nnja • nina.to/pycon2021

Slide 9

Slide 9 text

LEARN ABOUT ELECTRONICS ‣ Basic concepts ‣ Units of measurement ‣ Circuits ‣ Voltage, Current, Resistance and Ohm’s Law High-level overview: SparkFun engineering essentials ⠀

Slide 10

Slide 10 text

CIRCUIT BASICS Source: SparkFun Engineering Essentials

Slide 11

Slide 11 text

IPHONE / IPAD APP ICIRCUIT 3D (COST: $15)

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

SOLDERING GUIDES ‣Soldering is Easy Comic Book (Free) ‣Adafruit in-depth Guide ⚠ Follow safety precautions!

Slide 14

Slide 14 text

ADD INTERACTIVITY ‣ Buttons ‣ Potentiometers (knobs) ‣ Switches ‣ Sensors (temperature, air quality, sound, lots more!) ⠀ @nnja • nina.to/pycon2021

Slide 15

Slide 15 text

ADD CONNECTIVITY ‣ WiFi enabled ‣ Bluetooth ‣ Radio ‣ API calls ‣ Triggers ⠀ @nnja • nina.to/pycon2021

Slide 16

Slide 16 text

PROJECTS! @nnja • nina.to/pycon2021

Slide 17

Slide 17 text

SOCIAL BATTERY LED LANYARD ‣ Select a social battery from the touch screen menu ‣ LEDs change color, depending on selection. ⠀ @nnja • nina.to/pycon2021

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

DEMO @nnja • nina.to/pycon2021

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

IoT Projects: IoT weather station (Brent Rubell) & PyPortal Azure IoT Guide

Slide 23

Slide 23 text

RESOURCES @nnja • nina.to/pycon2021

Slide 24

Slide 24 text

FOLLOW AWESOME MAKERS Odd Jayy Becky Stern Sophy Wong Geek Mom Projects Stargirl Flowers Noé Ruiz & Pedro Ruiz & so many more!

Slide 25

Slide 25 text

GEEK MOM PROJECTS @ PYCASCADES 2021 link: watch on YouTube

Slide 26

Slide 26 text

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

Slide 27

Slide 27 text

GUIDES / HELP ‣ Instructables ‣ Sparkfun ‣ Adafruit Learn Guides ‣ Adafruit Discord (CircuitPython Channel) ‣ Hackaday (advanced) ⠀ @nnja • nina.to/pycon2021

Slide 28

Slide 28 text

THANKS! @NNJA @NNJAIO SLIDES: nina.to/pycon2021 PYTHON @ MICROSOFT: nina.to/ms-pycon2021

Slide 29

Slide 29 text

CREDITS ‣ Twitch icon and Twitter icon icon by Icons8 ‣ Photo by Stephen Kong on Unsplash @nnja • nina.to/pycon2021