Hey guys,
I'm using the revised I2C/Wire library by todbot and am looking for the command that is the same as "Wire.onRequest(requestEvent);" I figured it would be "i2c.onRequest(requestEvent);" but keep getting the error that says "'class SoftI2CMaster' has no member named 'onRequest'"
Here is the library I am using: GitHub - todbot/SoftI2CMaster: Software I2C / TWI library for Arduino allows any two pins to be SDA & SCL
Any ideas?
These are the public methods available in the library that you linked to
public:
// public methods
SoftI2CMaster();
SoftI2CMaster(uint8_t sclPin, uint8_t sdaPin);
SoftI2CMaster(uint8_t sclPin, uint8_t sdaPin, uint8_t usePullups);
void setPins(uint8_t sclPin, uint8_t sdaPin, uint8_t usePullups);
uint8_t beginTransmission(uint8_t address);
uint8_t beginTransmission(int address);
uint8_t endTransmission(void);
uint8_t send(uint8_t);
void send(uint8_t*, uint8_t);
void send(int);
void send(char*);
uint8_t requestFrom(int address);
uint8_t requestFrom(uint8_t address);
uint8_t receive( uint8_t ack );
uint8_t receive();
uint8_t receiveLast();
Thanks dude. I saw that, but I'll take another look. I might have overlooked something.
Anyone have an example of this library being used with a master and slave Arduino? The examples he has are not helpful for what I'm doing...