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

Nodebots, Frontend Masters

Steve Kinney
August 17, 2018
300

Nodebots, Frontend Masters

Steve Kinney

August 17, 2018
Tweet

Transcript

  1. Introduction to Nodebots
    Steve Kinney

    View Slide

  2. View Slide

  3. About the Tessel 2

    View Slide

  4. View Slide

  5. It’s time for a feature list!
    • 64MB of RAM
    • 32MB of flash storage
    • 802.11 b/g/n WiFi and an Ethernet port
    • 2 USB ports
    • A WiFi router
    • JavaScript as a first-class citizen!

    View Slide

  6. The Tessel 2 can be programmed
    via USB or over WiFi.

    View Slide

  7. While I generally prefer WiFi, we’re going to use
    USB primarily today—mostly because we’re in
    a workshop together with a dozen Tessels.

    View Slide

  8. View Slide

  9. Ground
    3v3
    A0
    A1
    A2
    A3
    A4
    A5
    A6
    A7
    Ground
    3v3
    B0
    B1
    B2
    B3
    B4
    B5
    B6
    B7

    View Slide

  10. GPIO: General purpose
    input/output.

    View Slide

  11. Some Tasting Notes
    • All 16 pins can be used for GPIO.
    • Pins A4, A7, and all pins on the B port can be used for analog to digital
    input.
    • Pins A5, A6, B5, and B6 support pulse-width modulation.
    • Pins A0, A1, B0, and B1 support I2C serial communication.
    • UART is available on both A5 and B5 (TX) and A6 and B6 (RX).
    • Pin B7 supports digital-to-analog conversion.

    View Slide

  12. Ground
    3v3
    A0: I2C
    A1: I2C
    A2
    A3
    A4
    A5: PWM, UART/TX
    A6: PWM, UART/RX
    A7
    Ground
    3v3
    B0: ADC, I2C
    B1: ADC, I2C
    B2: ADC
    B3: ADC
    B4: ADC
    B5: ADC, PWM, UART/TX
    B6: ADC, PWM, UART/RX
    B7: ADC, DAC

    View Slide

  13. View Slide

  14. How to Breadboard

    View Slide

  15. View Slide

  16. Blinking an LED
    The “Hello World” of
    hardware.

    View Slide

  17. Source: https://pixabay.com/en/led-lamp-diode-electronics-light-543475/
    Negative
    Positive

    View Slide

  18. Polarity TL;DR
    • Polarized components (LEDs, batteries) have a right and a
    wrong way.
    • Non-polarized components (resistors, buttons) can be
    installed either way.

    View Slide

  19. View Slide

  20. Pulsing
    Not so easy when you’re
    working with 1s and 0s.

    View Slide

  21. Turing an LED off and on is very
    gratifying, but can we make it fade in
    and out?

    View Slide

  22. Well, here’s the problem with digital:
    It’s all ones and zeroes, right?

    View Slide

  23. Pulse Width Modulation
    Source: https://commons.wikimedia.org/wiki/File:Pwm_5steps.gif

    View Slide

  24. Pins 5 and 6 on either port
    are capable of PWM.

    View Slide

  25. View Slide

  26. Buttons
    It’s time to let the “real world”
    interact with our code.

    View Slide

  27. Act One: Button Meets
    LED

    View Slide

  28. View Slide

  29. Act Two: Button Meets the
    Web

    View Slide

  30. View Slide

  31. Rainbow LED
    What’s better than an LED
    that lights up in one color?

    View Slide

  32. View Slide

  33. What’s the Weather?
    Collecting information from the
    outside world.

    View Slide

  34. View Slide

  35. Light Me Up
    Sensing light and updating the
    web.

    View Slide

  36. View Slide

  37. Intruder Alert
    Using Third-Party APIs and a
    Door Sensor

    View Slide

  38. View Slide

  39. Water Me?
    Connecting with a soil
    moisture sensor.

    View Slide

  40. View Slide

  41. LCDs
    Display text like you’re a
    printer from the early 1990s.

    View Slide

  42. View Slide