Advertisement
Guest User

Untitled

a guest
May 28th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. void setup() {
  2.   pinMode(2, INPUT_PULLUP);
  3.   pinMode(4, INPUT_PULLUP);
  4.   pinMode(7, INPUT_PULLUP);
  5.   Serial.begin(9600);
  6. }
  7.  
  8. void loop() {
  9.   boolean b2 = digitalRead(2);
  10.   boolean b4 = digitalRead(4);
  11.   boolean b7 = digitalRead(7);
  12.  
  13.   Serial.println("Źle podpięte przyciski:" + String(b2 ? " 2," : " ") + String(b4 ? " 4," : "") + String(b7 ? " 7" : ""));
  14.   delay(1000);
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement