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

Nodebots, Frontend Masters

Steve Kinney
August 17, 2018
350

Nodebots, Frontend Masters

Steve Kinney

August 17, 2018
Tweet

Transcript

  1. Introduction to Nodebots
    Steve Kinney

    View full-size slide

  2. About the Tessel 2

    View full-size slide

  3. 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 full-size slide

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

    View full-size slide

  5. 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 full-size slide

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

    View full-size slide

  7. GPIO: General purpose
    input/output.

    View full-size slide

  8. 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 full-size slide

  9. 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 full-size slide

  10. How to Breadboard

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  13. 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 full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  20. Act One: Button Meets
    LED

    View full-size slide

  21. Act Two: Button Meets the
    Web

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide