Questions tagged [wire-library]

Use this tag for the Wire library, used for I2C/TWI communication.

Filter by
Sorted by
Tagged with
1
vote
0answers
1k views

How to prevent Wire.requestFrom from hanging?

I'm trying to read data from an Arduino Uno I2C slave via Wire.requestFrom() on an Arduino Uno master. The slave's onRequest handler is simply: void I2C_Send() { byte myArray[4]; myArray[0] = ...
0
votes
1answer
575 views

How to make PCA9685 work with Arduino Due?

I have Arduino Due and PCA9685. I use this library: https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library The board does not do anything with servo connected. I tried to use SDA/SCL pins and ...
0
votes
1answer
362 views

How can I determine how many bytes an I2C master read from my Arduino acting as I2C slave?

I have an Atmega328 programmed using the Arduino software and libraries (but is standalone on on a board in the TSOP package) without bootloader and with ISP programming). I am using the Wire library ...
2
votes
2answers
799 views

Arduino Wire.h send double to lcd

I'd like the double number 200.00 shown as 200.00 on my LCD screen. For instance, when I pass just a number (int) like 40 to the LCD, it uses it as an ASCII code to show a character on the display. ...
1
vote
3answers
882 views

Arduino Wire.h library: how to communicate with an LCD?

I am having an Arduino Uno and a C2042A LCD with I2C shield on it. Because the VirtualWire library does not work for me. I tried only the wire library but it's still not working: My code: #include &...
0
votes
2answers
701 views

I2C communication between 2 Arduinos with updated wire library

I would like to enable communication between two Arduino 101. From what I have read, the best method is to use I2C using the wire library. However, it seems as though the newest Arduino IDE has an ...
5
votes
2answers
6k views

Wire.h not found!

Here's the code that's making this error: #include "Wire.h" Here's the error: fatal error: Wire.h: No such file or directory #include "Wire.h" ^ compilation terminated. Error ...
-1
votes
1answer
801 views

How to request data via I2C?

How do you program an Arduino Uno to request data over I2C, sending parameters defining the request? I'm trying to program Arduino A to read a sensor value from another Arduino B, and it first needs ...
3
votes
2answers
934 views

Wire Library send/receive

I'm doing a project that includes an Arduino Uno and custom hardware made by me. Everything is working perfectly independently, and I'm trying to implement a way for them (the Arduino and my hardware) ...
0
votes
2answers
3k views

SPISettings was not declared in this scope

I'm trying to compile a simple I2C example to read data from an MPU-6050 accel/gyro sensor, but I'm getting the compilation error: /usr/share/arduino/libraries/SD/src/utility/Sd2Card.cpp:27:8: error: ...
1
vote
1answer
159 views

Arduino Uno Wire Transmission Issues

I am developing code to run a word clock and have noticed a slight problem. I am using a DS3231 to keep time, and using the Wire library to communicate with it. I ping the DS3231 every second to get ...
0
votes
1answer
275 views

Olimexino 32u4: Wire.endTransmission() hangs

I'm trying to get a TAE5767 (FM radio) to work. According to this instructable I'm trying it on a 5V-Olimexino 32u4 (Leonardo-compatible) with following code (Arduino 1.6.3): #include <Wire.h> ...
0
votes
1answer
263 views

Using a class instance with Wire.onReceive

Is it possible to register a class instance member function with Arduino's Wire.OnReceive? I'm trying to make my code object-oriented, and want a specific non-static class function to handle I2C data,...
1
vote
0answers
179 views

Too many Bytes Using Ultrasonic Sensors

I need to send one transmission and record multiple distances with 4 receivers, but everytime I use more than 2 receivers, the serial data does not print. What can I do? P.S. I'm using 5 SRF-02 ...
1
vote
1answer
386 views

Modifying Arduino IMU library to rely on DSSCircuit's I2C Master Library

For an Arduino project I am working on, I am trying to modify the SparkFun 6 Degrees of Freedom IMU Digital Combo Board - ITG3200/ADXL345 to support DSSCircuit's I2C Master Library (https://github.com/...
1
vote
1answer
528 views

Why can't I include a library in another one?

I am trying to create a new library that uses another existing library. The original library declares a way to create an object called Multiserial that can be created in the main file and the program ...
1
vote
2answers
558 views

I2C between Arduinos without Master

I am working on a library for some Arduinos that should talk between each other. The aim is that I can load the same binaries onto each Arduino. The I2C ID will be set by DipSwitches. So far ...
0
votes
2answers
500 views

Switch MPU6050 to send SCL data through A4 and SDA through A5

I have this MPU6050, and like most of the other MPU6050s, it is set up for SCL to be attached to A4 and SDA to be attached to A5. I have this shield on my Arduino Uno, which is configured for ...
7
votes
2answers
51k views

Sending and receiving different types of data via I2C in Arduino

I have found a few good tutorials on how to send and receive data via I2C in connected arduinos. My limitation is now how to transmit different types of data like for instance, long, float, etc. Right ...
2
votes
1answer
195 views

Function not successfully reading sensor registers

I'm trying to write a library for an accelerometer/magnetometer sensor. The sensor is a LSM303D chip (https://www.pololu.com/file/0J703/LSM303D.pdf). I've written a function, readRegister() (below) ...
6
votes
5answers
11k views

Alternatives to Wire library for I2C

I am looking for (reasonably easy to use and well tested) alternatives to the Wire library. Wire works very well, but: I only need the Arduino to act as I2C master and the Wire library seems to be a ...
3
votes
1answer
224 views

Undefined functions send() and receive() on TwoWire/SPI

I have downloaded a sketch that uses SPI. The sketch includes the Wire library but at compilation time, I am getting errors that TwoWire doesn't have methods called send() and receive()?
0
votes
1answer
426 views

pcDuino 3B Wire library errors

I recently purchased a pcDuino 3B and I am very pleased with the Board so far. I can use the preinstalled arduino IDE to program the board from the board and run programs. However, when I came to use ...
1
vote
2answers
4k views

Arduino Uno (master) and ATTiny85 (slave) I2C connection not working

I am trying to send and receive data using I2C between an Arduino Uno and an ATTiny85. The Arduino Uno is using the Wire library. The ATTiny85 is using the TinyWire library and is programmed (and ...
1
vote
0answers
86 views

GPRS and Weather Shields

I have GPRS(GPRS_Shield_V1.0), weather shield and arduino uno R3. When I use Arduino and GPRS it works perfectly and when I used Weather Shield it also worked perfectly. But weather shield needs wire ...
1
vote
1answer
619 views

I2C hookup - sketch just crashes

I am encountering problems with I2C when trying to attach a 9DoF Sensor to my Arduino Uno. Following these instructions (the hardware setup I have is like in the schematic) I noticed the basic example ...
0
votes
1answer
987 views

Compilation error when trying to give pointer to a function to another function

I'm trying to write a library for Arduino using the Wire library. Here's my code: PiCom.h: #ifndef PiCom_h #define PiCom_h #include "Arduino.h" #include <Wire.h> class PiCom { public: ...
3
votes
2answers
528 views

Arduino Master-Slave Pins

Can I change the pins on the communication for a Master-Slave arduino Wire transmission? I want to communicate between 2 arduinos, but on one of them A4&A5 are taken

1
2