Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SoftwareSerial.h>
- #include <TinyWireM.h> //You need this library to write Master's code!
- #include <USI_TWI_Master.h>
- SoftwareSerial mySerial(0,1);
- void setup() {
- mySerial.begin(9600);
- TinyWireM.begin();
- delay (300);
- }
- void loop(){
- mySerial.println("networking week");
- TinyWireM.requestFrom(8,1);
- while (TinyWireM.available()) {
- int n = TinyWireM.receive();
- mySerial.println(n);
- }
- delay (600);
- }
Advertisement
Add Comment
Please, Sign In to add comment