Wire.h Arduino Library Download

Wire.h Arduino Library Download

ReferenceLanguage | Libraries | Comparison | Changes

Arduino library for the DS3231 real-time clock (RTC) Toggle navigation Arduino Library List. Filename Release Date File Size; DS3231-1.0.2.zip: 2017-10-11. The Arduino Wire library documentation is notoriously stingy in details. Nowhere does it explain its relationship to the twi library of the avr-lib. Count's value is limited by BUFFER_LENGTH which is defined in the Wire.h include file; at the time of this writing that number is 32. If count is greater than 32 it will be set to 32 without.

Libraries

The Arduino environment can be extended through the use of libraries, just like most programming platforms. Libraries provide extra functionality for use in sketches, e.g. working with hardware or manipulating data. To use a library in a sketch, select it from Sketch > Import Library.
A number of libraries come installed with the IDE, but you can also download or create your own. See these instructions for details on installing libraries. There's also a tutorial on writing your own libraries. See the API Style Guide for information on making a good Arduino-style API for your library.

Standard Libraries

  • EEPROM - reading and writing to 'permanent' storage
  • Ethernet - for connecting to the internet using the Arduino Ethernet Shield, Arduino Ethernet Shield 2 and Arduino Leonardo ETH
  • Firmata - for communicating with applications on the computer using a standard serial protocol.
  • GSM - for connecting to a GSM/GRPS network with the GSM shield.
  • LiquidCrystal - for controlling liquid crystal displays (LCDs)
  • SD - for reading and writing SD cards
  • Servo - for controlling servo motors
  • SPI - for communicating with devices using the Serial Peripheral Interface (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 - for controlling stepper motors
  • TFT - for drawing text , images, and shapes on the Arduino TFT screen
  • WiFi - for connecting to the internet using the 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 and all the SAMD21 based MKR boards 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

MKR WiFi 1010, MKR VIDOR 4000 and Arduino UNO WiFi Rev.2

  • WiFi NINA - library to use the WiFi Nina module of the above boards.

Arduino Nano 33 BLE, Nano 33 BLE Sense, NANO 33 IoT, Uno WiFi Rev 2, MKR WiFi 1010.

  • ArduinoBLE - library to use the BLE features of the above boards.

Arduino Nano 33 IoT and UNO WiFi Rev. 2

  • ArduinoLSM6DS3 - library to use the LSM6DS3 6 axis IMU available on the Arduino Nano 33 IoT and the Arduino UNO WiFi Rev. 2.

Arduino Nano 33 BLE and BLE Sense

  • ArduinoLSM9DS1 - library to use the LSM9DS1 9 axis IMU available on the Arduino Nano 33 BLE and the Arduino Nano 33 BLE Sense.

MKR Motor Carrier Only Library

  • MKR Motor Carrier - Library to be used with the MKR Motor Carrier

MKR FOX 1200 only Library

  • SigFox - library to be used only with MKRFOX1200

MKR WAN 1300 only Library

  • MKRWAN - library to be used only with MKR WAN 1300

MKR GSM 1400 only Library

  • MKRGSM - library to be used only with MKR GSM 1400

MKR NB 1500 only Library

  • MKRNB - library to be used only with MKR NB 1500

MKR 1000, MKR WiFi 1010, MKR GSM 1400, MKR NB 1500, MKR RS485 Shield, UNO WiFI Rev.2, Ethernet Shield only Library

  • Arduino Modbus - library to communicate with Modbus Protocol over RS485 and TCP with Modbus clients and servers.

MKR GPS Shield Library

  • ArduinoMKRGPS - library to be used with the Arduino MKR GPS Shield

MKR RGB Shield Libraries

Wire.h
  • ArduinoMKRRGB - library to be used with the Arduino MKR RGB Shield
  • ArduinoGraphics - library with graphic primitives, works also with the MKR RGB Shield

MKR 485 Shield Libraries

  • ArduinoRS485 - library that implements RS485 on the Arduino MKR RS485 shield

MKR ENV Shield Library

  • ArduinoMKRENV - library to read all the values measued by the Arduino MKR ENV Shield sensors

MKR THERM Shield Library

  • ArduinoMKRTHERM - library to read the sensors connected to the Arduino MKR THERM Shield

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)

Wire.h Arduino Library Download Pc

  • 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:

Arduino Library For Proteus

  • 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:

Arduino Wire.h Library Download

  • 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.

Wire.h Arduino Library

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

Permalink

Join GitHub today

GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Sign up
Find file Copy path
82adc95May 18, 2019
8 contributors
/*
TwoWire.h - TWI/I2C library for Arduino & Wiring
Copyright (c) 2006 Nicholas Zambetti. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Modified 2012 by Todd Krein (todd@krein.org) to implement repeated starts
Modified December 2014 by Ivan Grokhotkov (ivan@esp8266.com) - esp8266 support
Modified April 2015 by Hrsto Gochkov (ficeto@ficeto.com) - alternative esp8266 support
*/
#ifndef TwoWire_h
#defineTwoWire_h
#include<inttypes.h>
#include'Stream.h'
#defineBUFFER_LENGTH128
classTwoWire : publicStream
{
private:
staticuint8_t rxBuffer[];
staticuint8_t rxBufferIndex;
staticuint8_t rxBufferLength;
staticuint8_t txAddress;
staticuint8_t txBuffer[];
staticuint8_t txBufferIndex;
staticuint8_t txBufferLength;
staticuint8_t transmitting;
staticvoid (*user_onRequest)(void);
staticvoid (*user_onReceive)(size_t);
staticvoidonRequestService(void);
staticvoidonReceiveService(uint8_t*, size_t);
public:
TwoWire();
voidbegin(int sda, int scl);
voidbegin(int sda, int scl, uint8_t address);
voidpins(int sda, int scl) __attribute__((deprecated)); // use begin(sda, scl) in new code
voidbegin();
voidbegin(uint8_t);
voidbegin(int);
voidsetClock(uint32_t);
voidsetClockStretchLimit(uint32_t);
voidbeginTransmission(uint8_t);
voidbeginTransmission(int);
uint8_tendTransmission(void);
uint8_tendTransmission(uint8_t);
size_trequestFrom(uint8_t address, size_t size, bool sendStop);
uint8_tstatus();
uint8_trequestFrom(uint8_t, uint8_t);
uint8_trequestFrom(uint8_t, uint8_t, uint8_t);
uint8_trequestFrom(int, int);
uint8_trequestFrom(int, int, int);
virtualsize_twrite(uint8_t);
virtualsize_twrite(constuint8_t *, size_t);
virtualintavailable(void);
virtualintread(void);
virtualintpeek(void);
virtualvoidflush(void);
voidonReceive( void (*)(int) ); // arduino api
voidonReceive( void (*)(size_t) ); // legacy esp8266 backward compatibility
voidonRequest( void (*)(void) );
using Print::write;
};
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_TWOWIRE)
extern TwoWire Wire;
#endif
#endif
  • Copy lines
  • Copy permalink