Contents

A Quick Review on Arduino Built-in Examples

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

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

8. Strings

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.

Liked What You See?​
Get Updates And Learn From The Best​

Leave a Reply

Your email address will not be published. Required fields are marked *