Librairies

L'environnement Arduino peut être étendu grâce à l'utilisation de librairies, comme la plupart des environnements de programmation. Les librairies fournissent des fonctionnalités supplémentaires à utiliser dans les Sketch (sketch est le nom donné à votre fichier de programmation). Par exemple pour interagir avec les composants physiques de votre Arduino ou encore manipuler des fichiers. Pour utiliser une librairie, il suffit de la sélectionner depuis le menu Sketch > importer une librairie. Une fois importée dans l'environnement de programmation, il faudra déclarer cette librairie au début de votre sketch (Ex: #include <Math.h> )

Un certain nombre de librairies sont incluses de base dans l'IDE, mais vous pouvez quand même en télécharger de nouvelles ou bien en créer vous même. Il existe un tutoriel qui explique comment créer vos propres librairies. Jetez un œil à l' "API Style Guide" pour plus d'informations sur les bonnes pratiques d'écriture des librairies.

Librairies standard

EEPROM - Lire et écrire sur la mémoire "permanente" Ethernet / Ethernet 2 - Pour se connecter à internet en utilisant les cartes filles "Ethernet shield", "Arduino Ethernet Shield 2" et "Arduino Leonardo ETH". Firmata - Pour communiquer avec des applications d'ordinateur en utilisant un protocole série standard. GSM - Pour se connecter à un réseau GSM avec la carte fille "GSM shield". LiquidCrystal - Pour piloter des écrans LCD (Liquid Crystal Display). SD - Pour lire et écrire sur les cartes SD Servo - Pour contrôler des servo-moteurs SPI - Pour communiquer avec des périphériques qui utilisent l'interface Série périphérique (SPI Bus) SoftwareSerial - for serial communication on any digital pins. Version 1.0 and later of Arduino incorporate Mikal Hart's NewSoftSerial library as SoftwareSerial. Stepper - Pour piloter des moteurs pas à pas TFT - Pour dessiner du texte, des images et des formes sur l'écran Arduino TFT (TFT Screen). WiFi - Pour se connecter à Internet en utilisant la carte fille "Arduino WiFi shield". Wire - Two Wire Interface (TWI/I2C) for sending and receiving data over a net of devices or sensors. The Matrix and Sprite libraries are no longer part of the core distribution.

101 Only Libraries

CurieBLE - Interact with smartphones and tablets with Bluetooth Low Energy (BLE). CurieIMU - Manage the on-board accelerometer and gyro. CurieTimerOne - Allows to use Timer functions. CurieTime - Allows to control and use the internal RTC (Real Time Clock) Due Only Libraries

Audio - Play audio files from a SD card.

Due, Zero and MKR1000 Libraries

USBHost - Communicate with USB peripherals like mice and keyboards. Scheduler - Manage multiple non-blocking tasks.

Zero, MKRZERO and MKR1000 Libraries

AudioFrequencyMeter - Sample an audio signal and get its frequency back AudioZero - Play audio files from a SD card RTC - Real Time Clock to schedule events ArduinoSound - A simple way to play and analyze audio data I2S - To use the I2S protocol on SAMD21

WiFi 101 and MKR1000 Library

WiFi101 - library to be used only with Wifi shield 101 WiFi101OTA - Over-the-air updates on MKR1000

MKRFOX1200 only Library

SigFox - library to be used only with MKRFOX1200

Esplora Only Library

Esplora - this library enable you to easily access to various sensors and actuators mounted on the Esplora board.

Arduino Robot Library

Robot - this library enables easy access to the functions of the Arduino Robot.

Yún devices Library

Bridge Library - Enables communication between the Linux processor and the microcontroller on the Yún. Ciao Library - Aims to simplify interaction between microcontroller and Linino OS allowing a variety of connections with most common protocols

USB Libraries (Leonardo, Micro, Due, Zero and Esplora)

Keyboard - Send keystrokes to an attached computer. Mouse - Control cursor movement on a connected computer.

Contributed Libraries

If you're using one of these libraries, you need to install it first. See these instructions for details on installation. There's also a tutorial on writing your own libraries.

Communication (networking and protocols):

Messenger - for processing text-based messages from the computer NewSoftSerial - an improved version of the SoftwareSerial library OneWire - control devices (from Dallas Semiconductor) that use the One Wire protocol. PS2Keyboard - read characters from a PS2 keyboard. Simple Message System - send messages between Arduino and the computer SSerial2Mobile - send text messages or emails using a cell phone (via AT commands over software serial) Webduino - extensible web server library (for use with the Arduino Ethernet Shield) X10 - Sending X10 signals over AC power lines XBee - for communicating with XBees in API mode SerialControl - Remote control other Arduinos over a serial connection

Sensing:

Capacitive Sensing - turn two or more pins into capacitive sensors Debounce - for reading noisy digital inputs (e.g. from buttons)

Displays and LEDs:

GFX - base class with standard graphics routines (by Adafruit Industries) GLCD - graphics routines for LCD based on the KS0108 or equivalent chipset. Improved LCD library fixes LCD initialization bugs in official Arduino LCD library LedControl - for controlling LED matrices or seven-segment displays with a MAX7221 or MAX7219. LedControl - an alternative to the Matrix library for driving multiple LEDs with Maxim chips. LedDisplay - control of a HCMS-29xx scrolling LED display. Matrix - Basic LED Matrix display manipulation library PCD8544 - for the LCD controller on Nokia 55100-like displays (by Adafruit Industries) Sprite - Basic image sprite manipulation library for use in animations with an LED matrix ST7735 - for the LCD controller on a 1.8", 128x160 TFT screen (by Adafruit Industries)

Audio and Waveforms:

FFT - frequency analysis of audio or other analog signals Tone - generate audio frequency square waves in the background on any microcontroller pin

Motors and PWM:

TLC5940 - 16 channel 12 bit PWM controller.

Timing:

DateTime - a library for keeping track of the current date and time in software. Metro - help you time actions at regular intervals MsTimer2 - uses the timer 2 interrupt to trigger an action every N milliseconds.

Utilities:

PString - a lightweight class for printing to buffers Streaming - a method to simplify print statements

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.

Share