0% found this document useful (0 votes)
6 views6 pages

Guide On Arduino Programming

The document provides a comprehensive list of built-in libraries for Arduino, categorized into core, sensor, display, communication, motor, real-time, file system, audio, other, and miscellaneous libraries. It also includes a summary of built-in functions such as basic, digital I/O, analog I/O, math, time, serial communication, trigonometry, random, and bitwise functions. Additionally, it suggests potential capstone project ideas like a delivery drone and automating crop cutting.

Uploaded by

ebaak884
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views6 pages

Guide On Arduino Programming

The document provides a comprehensive list of built-in libraries for Arduino, categorized into core, sensor, display, communication, motor, real-time, file system, audio, other, and miscellaneous libraries. It also includes a summary of built-in functions such as basic, digital I/O, analog I/O, math, time, serial communication, trigonometry, random, and bitwise functions. Additionally, it suggests potential capstone project ideas like a delivery drone and automating crop cutting.

Uploaded by

ebaak884
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

All Arduino Built-in libraries:

Core Libraries

1. Arduino.h – The main core library for all Arduino sketches.


2. Wire – I2C communication.
3. SPI – SPI communication.
4. SoftwareSerial – Software serial communication on other digital pins.
5. EEPROM – Reading and writing to EEPROM memory.
6. Servo – Control for servo motors.
7. LiquidCrystal – For character LCDs.
8. SPI.h – Low-level SPI communication.
9. SD – For accessing SD cards.
10. Time – Time management functions.
11. WMath – Mathematical functions.
12. Math.h – Standard math functions.
13. Keypad – For interfacing with keypad matrices.
14. Wire.h – For I2C communication.
15. SPI.h – For SPI communication.
16. Stream – Stream class for input/output operations.

Sensor Libraries

1. Adafruit_Sensor – Unified sensor library for various Adafruit sensors.


2. DHT – DHT11/DHT22 temperature and humidity sensor.
3. Adafruit_BMP280 – BMP280 Barometric Pressure and Temperature sensor.
4. Adafruit_GPS – For interfacing with GPS modules.
5. Adafruit_LSM303 – For LSM303 Accelerometer and Magnetometer.
6. Adafruit_TCS3200 – Color sensor library (TCS3200).
7. OneWire – For OneWire devices like DS18B20 temperature sensors.
8. NewPing – Library for ultrasonic sensors like HC-SR04.
9. Adafruit_MPU6050 – Accelerometer and Gyroscope (MPU6050 sensor).
10. VL53L0X – Time-of-Flight distance sensor.
11. HX711 – Load cell amplifier library for weighing scales.
12. Ultrasonic – For ultrasonic sensors (e.g., HC-SR04).

Display Libraries

1. Adafruit_GFX – Graphics library for use with various displays.


2. Adafruit_SSD1306 – For controlling OLED displays based on SSD1306.
3. TFT – For controlling TFT screens.
4. LiquidCrystal_I2C – For controlling LCD screens over I2C.
5. U8g2 – Universal graphics library for multiple displays.
6. Adafruit_ILI9341 – TFT display library.
7. TFT_eSPI – A library for using ESP32/ESP8266 with TFT displays.

Communication Libraries

1. WiFi – For Wi-Fi communication with ESP8266/ESP32.


2. WiFi101 – For Wi-Fi communication with the Wi-Fi shield 101.
3. GSM – For GSM communication using the GSM shield.
4. Ethernet – For Ethernet shield communication.
5. LoRa – For LoRa communication.
6. XBee – For XBee radio communication.
7. BLE – Bluetooth Low Energy communication.
8. RFID – For RFID communication.
9. Firmata – A library to control Arduino from a computer via serial communication.
10. NTPClient – For getting time over the network using NTP protocol.
11. Adafruit_MQTT – MQTT library for communicating with brokers.

Motor Libraries

1. AccelStepper – Advanced stepper motor control.


2. Stepper – Basic stepper motor control.
3. DCMotor – Control for DC motors.
4. Adafruit_Motor_Shield_V2 – Motor control using Adafruit Motor Shield V2.
5. Servo – For controlling servo motors.

Real-Time Libraries

1. Time – A library for time-related functions.


2. RTClib – For interfacing with RTC (Real-Time Clock) modules like DS3231.
3. TimerOne – For Timer1 on Arduino boards for precise timing.
4. TimerThree – For Timer3 on Arduino boards.
5. Metro – For time-based task scheduling.

File System Libraries

1. SD – For accessing SD cards (SD card file system).


2. SPIFFS – For using the SPI Flash File System, common with ESP8266 and ESP32.

Audio Libraries

1. Tone – For generating sound using tone generation.


2. Mozzi – A sound synthesizer library for Arduino.

Other Libraries

1. FastLED – A library for controlling RGB LEDs like WS2812 (Neopixels).


2. Adafruit_NeoPixel – A library for controlling individually addressable RGB LEDs.
3. IRremote – For receiving and transmitting infrared signals.
4. Adafruit_LIS3DH – For 3D accelerometer control.
5. Adafruit_NFCShield – For NFC/RFID modules.
6. Bounce2 – For debouncing buttons.
7. PID_v1 – A PID control library for feedback systems.
8. AccelStepper – For advanced stepper motor control.
9. DFPlayerMini_Fast – For controlling the DFPlayer Mini MP3 module.

Miscellaneous Libraries

1. Adafruit_ServoMotor – For controlling servos.


2. SimpleDHT – A simple library for DHT sensors (DHT11/DHT22).
3. Adafruit_BNO055 – For interfacing with the BNO055 (9-axis sensor).
4. Adafruit_VL53L0X – For the VL53L0X distance sensor (time-of-flight sensor).
5. Adafruit_TemperatureSensor – For working with temperature sensors
analogRead(A0)- used to read that value of voltage at A0 pin

0 means 0V

1023 means 5V

int a;

a=analogRead(A0); //means the value of analog voltage at pin A0 is stored in a.

-o -

map() is a built-in Arduino function that scales a number from one range to another.

map(value, fromLow, fromHigh, toLow, toHigh)

 value → The number to scale (e.g., a from analogRead(A0))


 fromLow & fromHigh → The original range (e.g., 0 to 1023)

 toLow & toHigh → The new range (e.g., 0 to 255)

List of All Arduino Built-in Functions

1️⃣ Basic Functions

 setup() → Runs once at the beginning.


 loop() → Runs repeatedly after setup().

2️⃣ Digital I/O Functions (For reading and writing digital pins)

 pinMode(pin, mode) → Sets a pin as INPUT, OUTPUT, or INPUT_PULLUP.


 digitalWrite(pin, value) → Sets a pin HIGH (5V) or LOW (0V).
 digitalRead(pin) → Reads a digital input (HIGH or LOW).

3️⃣ Analog I/O Functions (For reading and writing analog values)

 analogRead(pin) → Reads a value (0-1023) from an analog pin.


 analogWrite(pin, value) → Writes a PWM signal (0-255) to a pin (only on PWM pins ~).

4️⃣ Math Functions

 map(value, fromLow, fromHigh, toLow, toHigh) → Scales a number from one range
to another.
 constrain(value, min, max) → Limits a number within a range.
 min(x, y) → Returns the smaller number.
 max(x, y) → Returns the larger number.
 abs(x) → Returns the absolute value.
 pow(base, exponent) → Raises a number to a power.
 sqrt(x) → Returns the square root.

5️⃣ Time Functions

 delay(ms) → Pauses the program for ms milliseconds.


 millis() → Returns the number of milliseconds since the program started.
 micros() → Returns the number of microseconds since the program started.

6️⃣ Serial Communication (For Printing Data to PC/Monitor)

 Serial.begin(baudRate) → Starts serial communication (e.g., Serial.begin(9600);).


 Serial.print(value) → Prints a value in the Serial Monitor.
 Serial.println(value) → Prints a value with a new line.
 Serial.read() → Reads incoming data.
 Serial.available() → Checks if there is incoming data.

7️⃣ Trigonometry & Random Functions

 sin(x), cos(x), tan(x) → Trigonometric functions.


 random(min, max) → Returns a random number in a range.
 randomSeed(seed) → Seeds the random generator.

8️⃣ Bitwise Functions (For Advanced Control)

 bitRead(x, n), bitWrite(x, n, b), bitSet(x, n), bitClear(x, n) → Manipulate


specific bits.
 shiftLeft(x, n), shiftRight(x, n) → Bit shifting operations.

Capstone idea-

1)delivery drone

2)automating crop cutting


3)

4)

You might also like