Dear all,
I just got my new Arduino Duo and I am trying to use I2C communication to command an 8-bit expander. But I can not make it work
So the first thing I am trying is to see the I2C signal going out from the Arduino in a Scope, but I can not see anything. In the scope SCL and SDA are fixed at 5v and I can not see any frame in the screen.
My code and my HW configuration are as follows:
#include <Wire.h>
void setup() {
Wire.begin();
}
void loop() {
Wire.beginTransmission(4);
Wire.write(3);
Wire.endTransmission();
}
This is all the code I have. Is there something missing?
For the Hardware I have only my Arduino Duo with pins SCL1 and SDA1 connected to the scope. For the moment the I/O expander is not connected to it because I just want to see SDA and SCL in the Scope.
I have tried with and without 10 kOhm pull-up resistors and nothing.
I am using SDA1 and SCL1 pins in the Arduino Due.
After reading a lot of literature I have several questions:
-Is the code I have enough for making the Master (arduino Due) transmit a frame to the slave (still no slave connected for now).
-Do I need to connect a slave to be able to see any frame transmitted by the master? I haven't tried yet because I still don't have my expander.
-Do I need to initialize the Serial port with: Serial.begin("some speed")? Which speed? I saw it in some examples but I don't understand why should I do that. Also, I tried and I does not work.
Is my first time working with Arduino, so maybe I am missing something really basic. What else can I try??
Thanks for the help,
Pep