Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <TinyWireS.h> //You need this library to upload the sketch on your slave board
- void setup()
- {
- TinyWireS.begin(8); //I2C communication
- TinyWireS.onRequest(test);
- }
- void loop()
- {
- TinyWireS_stop_check();
- }
- void test () //Master calls the slave and the latter one send data
- {
- TinyWireS.send(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment