CoMotion Makerspace Arduino 101 Workshop
The introduction Slide
Please go through the projects in the folder before going through other projects introduced below. The projects in the folder will give you an basic idea about Serial Monitor, Digital/Analog I/O, basic electronics, basic Arduino programming (For loop, Array, If-Condition.)
In each project, there is a project instruction guide and the Arduino code. Just download the whole file folder, open the Arduino .ino files and run the code to learn how Arduino works.
The ones with bold font means, we have it or similar ones in our repo, otherwise it will redirect to Arduino Tutorial Page.
- Blink: Turn an LED on and off.
- Analog Read Serial: Read a potentiometer, print its state out to the Arduino Serial Monitor.
- Digital Read Serial: Read a switch, print the state out to the Arduino Serial Monitor.
- Fade: Demonstrates the use of analog output to fade an LED.
- Read Analog Voltage: Reads an analog input and prints the voltage to the Serial Monitor.
- Blink Without Delay: Blink an LED without using the delay() function.
- Button: Use a pushbutton to control an LED.
- Debounce: Read a pushbutton, filtering noise.
- Digital Input Pullup: Demonstrates the use of INPUT_PULLUP with pinMode().
- State Change Detection: Count the number of button pushes.
- Tone Keyboard: A three-key musical keyboard using force sensors and a piezo speaker.
- Tone Melody: Play a melody with a Piezo speaker.
- Tone Multiple: Play tones on multiple speakers sequentially using the tone() command.
- Tone Pitch Follower: Play a pitch on a piezo speaker depending on an analog input.
- Analog In Out Serial: Read an analog input pin, map the result, and then use that data to dim or brighten an LED.
- Analog Input: Use a potentiometer to control the blinking of an LED.
- Analog Write: Fade 12 LEDs on and off, one by one, using an Arduino board.
- Fading: Use an analog output (PWM pin) to fade an LED.
- Smoothing: Smooth multiple readings of an analog input.
These examples include code that allows the Arduino to talk to Processing sketches running on the computer. For more information or to download Processing, see processing.org. There are also Max/MSP patches that can communicate with each Arduino sketch as well. For more on Max/MSP see Cycling 74.
- ASCIITable: Demonstrates Arduino's advanced serial output functions.
- Dimmer: Move the mouse to change the brightness of an LED.
- Graph: Send data to the computer and graph it in Processing.
- Midi: Send MIDI note messages serially.
- Multi Serial Mega: Use two of the serial ports available on the Arduino Mega.
- Physical Pixel: Turn a LED on and off by sending data to your Arduino from Processing or Max/MSP.
- Read ASCII String: Parse a comma-separated string of integers to fade an LED.
- Serial Call Response: Send multiple variables using a call-and-response (handshaking) method.
- Serial Call Response ASCII: Send multiple variables using a call-and-response (handshaking) method, and ASCII-encode the values before sending.
- Serial Event: Demonstrates the use of SerialEvent().
- Serial Passthrough: Demonstrates how to virtually connect Serial and Serial1.
- Virtual Color Mixer: Send multiple variables from Arduino to your computer and read them in Processing or Max/MSP.
- Arrays: A variation on the For Loop example that demonstrates how to use an array.
- For Loop Iteration: Control multiple LEDs with a for loop and.
- If Statement Conditional: Use an ‘if statement’ to change the output conditions based on changing the input conditions.
- Switch Case: How to choose between a discrete number of values.
- While Statement Conditional: How to use a while loop to calibrate a sensor while a button is being read.
- ADXL3xx: Read an ADXL3xx accelerometer.
- Knock: Detect knocks with a piezo element.
- Memsic2125: Two-axis accelerometer.
- Ping: Detect objects with an ultrasonic range finder.
- Photoresistor Light sensor and change the brightness of the LED
- Temperature SensorTemperature Sensor.
- Bar Graph: Make an LED bar graph.
- RowColumnScanning: Control an 8x8 matrix of LEDs.
- Character Analysis: Use the operators to recognise the type of character we are dealing with.
- String Addition Operator: Add strings together in a variety of ways.
- String Append Operator: Use the += operator and the concat() method to append things to Strings.
- String Case Changes: Change the case of a string.
- String Characters: Get/set the value of a specific character in a string.
- String Comparison Operators: Compare strings alphabetically.
- String Constructors: Initialize string objects.
- String Index Of: Look for the first/last instance of a character in a string.
- String Length & String Length Trim: Get and trim the length of a string.
- String Replace: Replace individual characters in a string.
- String Start With Ends With: Check which characters/substrings a given string starts or ends with.
- String Substring: Look for "phrases" within a given string.
- String To Int: Allows you to convert a String to an integer number.
The Keyboard and Mouse examples are unique to the Leonardo, Micro and Due. They demonstrate the use of libraries that are unique to the board.
- Keyboard Logout: Logs out the current user with key commands.
- Keyboard Message: Sends a text string when a button is pressed.
- Keyboard Reprogram: Opens a new window in the Arduino IDE and reprograms the Leonardo with a simple blink program.
- Keyboard Serial: Reads a byte from the serial port, and sends back a keystroke.
- Keyboard Mouse Control: Demonstrates the Mouse and Keyboard commands in one program.
- Button Mouse Control: Control cursor movement with 5 pushbuttons.
- Joystick Mouse Contol: Controls a computer's cursor movement with a Joystick when a button is pressed.