- Finish making your circuits
- Review Day 2
- Intro to Microcontrollers
- Setting up the IDE
- Digital In/Out
- Analog In/Out
Intro to Microcontrollers
- Microcontrollers are essentially small computers with limited memory and processing power, designed to take input from the physical world (via sensors ) and then signal output devices in the physical world (lights, sound, actuators, screens, etc.)
- Our microcontroller for this workshop will be the adafruit itsy bitsy, which provides the same functionality as the Arduino Uno or Arduino Leonardo, but in a smaller form.
Setting up the Arduino IDE
- The IDE (Integrated Development Environment) is a text editor with added functionality that we will use to write programs (sketches) for our microcontrollers and upload programs to the memory of the microcontroller.
- We will use the Arduino IDE to program our microcontroller
- To set up: (Full Adafruit Tutorial for the Itsy Bitsy)
- Install the Adafruit board definitions
- Specify board
- Specify port
- Upload blink (a sketch to check function and troubleshoot if necessary)
Programing the Microcontroller
- In code we can specify which pins the microcontroller should read information from (input) and which pins it should use to control components and peripherals (output).
- Digital in/out — Input and output are binary:
- You can read switches and sensors as on/off, high/low, open/closed
- You can program an output to be on/off, high/low,
- Analog in/out — Inputs are readable (and outputs are controllable) across a continuous range
- For the Itsy Bitsy and other Arduino boards, the range that we will read for inputs is different than the range that we can output.
- Inputs range from 0-1023
- Outputs can range from 0-255
Visit to Toni Dove’s studio
Visit Toni’s studio