Today we dove into the world of Arduino and sampled some key functions using it.
Digital reading and output, analog reading and output, sending values back to the computer and controlling the movement of a servo. The session was an introduction to show you how to work with the Arduino and how to work with it’s tutorials to learn more.
Naturally this means you can make use of all the resources of the interaction Lab. Arduino, USB-cable, breadboard and any components/shields/sensors etc is at your disposal. If you want to, you can even buy your own Arduino kit from me (worth 600 SEK, you pay 300 SEK) which contains most things you need for basic tutorials.
During the intro session we went through the following tutorials on www.arduino.cc:
The majority of these are found at Arduinos’ tutorial page: https://docs.arduino.cc/built-in-examples/
Blink (blinking LED)
Button (a button controls a LED)
Analog read serial
Analog In, Out Serial (reading a potentiometer, controlling fade and sending values back to computer)
Knob (controlling a servo with a potentiometer)
Suggestions to expand on these tutorials:
Blink: Make a more complex blinking pattern, connect more LEDs and blink together
Button: Connect another button and have the code turn the LED on if you press one, and off if you press the other.
Analog in, out serial: have the LED light up in steps rather than gradually (hint: replace map() with if-statements)
Knob: Connect a LED to the Arduino and have it light up when the servo is at any end value (0 or 180).
Other suitable starter level tutorials
Fade (introduction to analogWrite())
Input pullup (How to use a simpler button circuit)
State machine (counting button presses and changing state/mode)
TonePitchFollower (play music with a light sensor)
Sweep (control a servo only by code)
HelloWorld (write text to an LCD)
There’s more fun and advice to find on Arduino’s playground and forum.
Tutorials on Intructables.com
instructables.com is an excellent web resource for ANY hobby project and if you search on the site for “Arduino” you will get a LOT of hits on projects of different difficulties. An example is a user called MertArduino who has a wide variety of projects, many of which is at a good learning level and using parts that we have in the Lab.
An especially useful early tutorial on Instructables is 3 beginner mistakes with Arduino