Guest User

Untitled

a guest
May 31st, 2018
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include <SoftwareSerial.h>
  2. #include <TinyWireM.h> //You need this library to write Master's code!
  3. #include <USI_TWI_Master.h>
  4.  
  5. SoftwareSerial mySerial(0,1);
  6.  
  7. void setup() {
  8. mySerial.begin(9600);
  9. TinyWireM.begin();
  10. delay (300);
  11. }
  12.  
  13. void loop(){
  14. mySerial.println("networking week");
  15. TinyWireM.requestFrom(8,1);
  16. while (TinyWireM.available()) {
  17. int n = TinyWireM.receive();
  18. mySerial.println(n);
  19. }
  20. delay (600);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment