Skip to content

Commit

Permalink
Create master.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickleboutillier committed Sep 6, 2020
1 parent b57887c commit c181496
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions examples/master/master.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include "Extension.h"

Extension sl1(5) ;
Extension sl2(6) ;

void setup(){
Serial.begin(9600) ;
sl1.pinMode(2, INPUT) ;
sl2.pinMode(2, INPUT) ;
}

void loop(){
byte v = sl1.digitalRead(2) ;
Serial.print("Pin 2 of slave 1 is: ") ;
Serial.println(v) ;
v = sl2.digitalRead(2) ;
Serial.print("Pin 2 of slave 2 is: ") ;
Serial.println(v) ;

// ...
}

0 comments on commit c181496

Please sign in to comment.