- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AVR libraries in Arduino – Introduction
AVR libraries are developed by Atmel. You might be knowing that the microcontrollers used in most Arduino boards are Atmel microcontrollers (ATmega328P, ATmega2560, etc.). AVR libraries for several specific operations (sleep, time, etc.) already exist, and therefore, we may greatly benefit if we are able to import AVR libraries within Arduino. The good news is that we can!
As per Arduino's website,
"AVR libraries have the potential to greatly extend the Arduino language. The Arduino system is based on the avr-gcc compiler and makes use of the standard AVR libc libraries, which are open-source C libraries, specifically written for Atmel hardware, the maker of the chips upon which the Arduino runs."
The list of AVR libraries can be found on the main AVR library page.
Example
In order to verify that the AVR libraries work within the Arduino IDE, you can simply compile the following code −
#include <avr/sleep.h> void setup() { // put your setup code here, to run once: Serial.begin(9600); Serial.println(); } void loop() { // put your main code here, to run repeatedly: }
You will notice that it compiles without any error, confirming that the AVR libraries get included without any error in Arduino IDE.
- Related Articles
- RTOS Introduction with Arduino
- Arduino Time Library Introduction
- Browse Arduino libraries by Category on Arduino Website
- Introduction to Arduino Online Editor
- Get Source Codes of Libraries that come with Arduino IDE
- POSIX Thread Libraries
- Loading External Libraries in SAP UI5
- Loading 3rd party libraries in SAPUI5
- What are Standard Libraries in C++?
- BK Tree Introduction in C++
- Introduction to ensureFileSync() in NodeJS
- Introduction to Sequelize in NodeJS
- Byte-compile Python libraries
- What are thread libraries?
- Mathematical Foundation Introduction
