Example code and notes on Arduino workshop organised by AIR Lab at ITU Copenhagen.
- Arduino is an easy platform to start with, a fast way to prototype projects and cheap to buy.
- Connect device to laptop and IDE
$\rightarrow$ write and verify code$\rightarrow$ upload to device and run. - Simple sensors and actuators:
- Proximity sensor
- LED light strip
- Motor
- Sound speaker
- Two type of loops
- Setup - code that will run once on start.
- Loop - code that will run repeatedly after setup loop.
- If there are not enough connector pins on Arduino, use breadboard.
- Distance sensor returns analog value in range 0 - 1023, and needs to be connected to analog pins.
- Arduino has two main type of pins: digital and analog.
- PWM~ symbol indicates that digital pins can be used to generate signals that mimic analog output.
- FastLED is an Arduino library for easy LED control.