A. Arduino Command Reference
This section provides a quick overview of commonly used Arduino commands and their descriptions:
-
Setup and Loop:
-
void setup() { }
- Runs once when the program starts.
-
void loop() { }
- Runs repeatedly after setup()
.
-
Digital I/O:
-
pinMode(pin, mode)
- Sets the mode of a pin (INPUT or OUTPUT).
-
digitalWrite(pin, value)
- Writes a HIGH or LOW value to a pin.
-
digitalRead(pin)
- Reads the value from a pin.
-
Analog I/O:
-
analogRead(pin)
- Reads the value from an analog pin (0 to 1023).
-
analogWrite(pin, value)
- Writes a PWM wave to a pin.
-
Timing:
-
delay(ms)
- Pauses the program for a specified number of milliseconds.
-
millis()
- Returns the number of milliseconds since the program started.
-
Serial Communication:
-
Serial.begin(baud_rate)
- Starts serial communication.
-
Serial.print(data)
and Serial.println(data)
- Sends data to the serial port.
-
Serial.available()
- Returns the number of bytes available to read.
-
Serial.read()
- Reads incoming serial data.
B. Resources and Recommended Reading
-
Books:
- "Arduino Workshop" by John Boxall
- "Exploring Arduino" by Jeremy Blum
- "Programming Arduino: Getting Started with Sketches" by Simon Monk
-
Online Platforms:
-
Forums and Communities:
C. Glossary of Terms
-
GPIO (General-Purpose Input/Output): Pins on Arduino used for input or output operations.
-
PWM (Pulse-Width Modulation): A modulation technique to achieve analog results with digital means.
-
IDE (Integrated Development Environment): Software used to write, compile, and upload code. In this context, the Arduino IDE.
-
Sketch: A program written for Arduino.
-
Shield: A board that can be attached to an Arduino board to provide additional functionalities.
-
Baud Rate: The speed of data transfer in serial communication, measured in bits per second.
-
Pull-Up/Pull-Down Resistor: Resistors used to ensure that a wire is pulled to a consistent voltage in the absence of input.
-
Firmware: Software that provides low-level control for a device's specific hardware.
This appendices section serves as a quick reference guide, aiding in revisiting concepts, exploring further resources, and understanding common terms in the Arduino world.
Leave a comment