@Cognitive5525 said in AIN4-20mA Unit to Arduino Nano Every:
No as I am not using an M5Stack, I am trying to use an Arduino Nano Every.
@Cognitive5525 said in AIN4-20mA Unit to Arduino Nano Every:
No as I am not using an M5Stack, I am trying to use an Arduino Nano Every.
@robski I assumed as it was I2C then anything that had an I2C port should work as it's a standard protocol, but I could be wrong as well.
I am trying to talk to the module using a Nano Every using the standard wire example, I get no output at all. If I use a sniffing sketch, it detects the device on 0x55 so it is visible on the bus.
#include <Wire.h>
void setup() {
Wire.begin(8); // join i2c bus (address optional for master)
Serial.begin(9600); // start serial for output
}
void loop() {
Wire.requestFrom(0x55, 8); // request 8 bytes from slave device 0x55
while (Wire.available()) { // slave may send less than requested
char c = Wire.read(); // receive a byte as character
Serial.print(c,DEC); // print the character
}
delay(250);
}
I have a 4-20mA current source which I can measure, so I am confident I have a variable input.
I have not used I2C before, I am confident the Arduino libraries are correct, so any pointers to what it might be would be appreciated. Thanks.