Slide 1

Slide 1 text

Introduction to Nodebots Steve Kinney

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

About the Tessel 2

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

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!

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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.

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

GPIO: General purpose input/output.

Slide 11

Slide 11 text

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.

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

How to Breadboard

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

Blinking an LED The “Hello World” of hardware.

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

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

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

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

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

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

Slide 27

Slide 27 text

Act One: Button Meets LED

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

Act Two: Button Meets the Web

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

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

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

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

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

Light Me Up Sensing light and updating the web.

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

Intruder Alert Using Third-Party APIs and a Door Sensor

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

Water Me? Connecting with a soil moisture sensor.

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

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

Slide 42

Slide 42 text

No content