There are several examples in Arduino IDE to help you get up and running with Arduino boards. In this tutorial, you will learn about each of them.
1. Basics
- Analog Read Serial: To read the value of a potentiometer and to display it in the Monitor Serial.
- Bare Minimum: To create a simple sketch with the most basic parts of the coding (setup and loop).
- Blink: Turns an LED on and off flashing.
- Digital Read Serial: Reads the status of a switch and displays it in the Monitor Serial.
- Fade: To increase or decrease LED brightness using analog output.
- Read Analog Voltage: Reads the value of analog voltage as input and displays it in the Monitor Serial.
2. Digital
- Blink Without Delay: Making a flashing LED without using the delay () function
- Button: To control LED
- Debounce: To read the status of a switch and remove its noise
- Digital Input PULLUP: Defining the lift resistance in an input using the command INPUT_PULLUP
- State Change Detection: To count that how many times a key is pressed
- Tone Keyboard: To build a 3-key musical device using a power sensor and speaker
- Tone Melody: To generate a music using piezo speaker
- Tone Multiple: Consecutive music playback on multiple piezo speakers
- Tone Pitch Follower: To generate sound on piezo speaker based on the value of analog input.
3. Analog
- Analog In Out Serial: Reads the value of analog voltage as an input, maps the result and uses the value to control the LED brightness.
- Analog Input: •: Flashing speed control of an LED by potentiometer
- Analog Write Mega: To change the brightness of 12 LEDs using the Arduino Mega board
- Calibration: Defining the maximum and minimum value of analog sensor
- Fading: using analog output pins (PWM) to control LED brightness.
- Smoothing: Read the analog input value, average it and display the calculation result in the Monitor serial.
4. Communication
Here are some examples of codes which are used for communication of Processing software or Max/MSP with Arduino IDE.
- ASCIITable: Advanced capability of output print for serial communication
- Dimmer: To control LED brightness using mouse movement.
- Graph: Sending information from Arduino to computer and drawing diagram in Processing software.
- Midi: Sending information using MIDI protocol.
- Multi Serial Mega: Using 2 serial port on Arduino Mega board.
- Physical Pixe: To turn the LED on and off using sending commands from Processing or Max / MSP.
- Read ASCII String: Analyzing a string containing numbers separated by commas to control the LED brightness.
- Serial Call Response: Sending several variables using call-and-response
- Serial Call Response ASCII: Sending several variables using call-and-response and ASCII
- Serial Event: To Describe the SerialEvent () command
- Serial Passthrough: Approximate connection of Serial and Serial1 to each other (for boards with multiple hardware serial interfaces)
- Virtual Color Mixer: Making different colors in Processing or Max / MSP using commands sent to the computer via Arduino.
5. Control Structures
- Arrays: To explain how to use arrays
- For Loop Iteration: To control multiple LEDs using for loop
- If Statement Conditional: Using the if conditional sentence
- Switch Case: Using the Switch Case structure to choose between several discrete modes
- Switch Case 2: Useing the Switch Case structure to perform various operations according to the character received from the serial port
- While Statement Conditional: An example of how to use the conditional while statement
6. Sensors
- ADXL3xx: Reading the output values of ADXL3xx accelerometers
- Knock: impact detection using a piezo element
- Memsic2125: An example of interfacing a 2-axis accelerometer sensor
- Ping: Object detection using ultrasonic waves
7. Sensors
- Bar Graph: Barograph LED control
- RowColumnScanning: 8 * 8 matrix LED control
8. Strings
- Character Analysis: Identify the type of characters written in the input
- String Addition Operator: Collecting string in different ways
- String Append Operator: Using the + = operator and the concat () command to attach strings
- String Case Changes: converting current letters in string to capital or small letter
- String Characters: To Get/set a specific character in a string.
- String Comparison Operators: Comparing 2 string
- String Constructors: How to make a string
- String Index Of: Look for a specific character in the string and specify its index.
- String Length & String Length Trim: To read the string length and string trim.
- String Replace: To change specific characters from a string.
- String Start With Ends With: To check whether the string starts / ends with a specific character.
- String Substring: To Search a phrase in string
- String To Int: To change string to number
9. USB
This section contains examples of how the mouse and keyboard communicate with the Arduino. The codes and libraries are used only for Arduino Leonardo, Micro and Due boards.
10. Starterkit & BasicKit
Here are some examples to work with StarterKit and BasicKit kits.
11. Arduino ISP
Your Arduino board turns to a programmer using this code and you can use it to program other Arduino boards.