Advertisement
mikroavr

genset_pln

Jul 3rd, 2023
932
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const byte pin_pln = 36;
  2. const byte pin_genset = 39;
  3.  
  4. void setup() {
  5.   // put your setup code here, to run once:
  6.   pinMode(pin_pln, INPUT);
  7.   pinMode(pin_genset, INPUT);
  8.   Serial.begin(115200);
  9. }
  10.  
  11. void loop() {
  12.   // put your main code here, to run repeatedly:
  13.   bool dt_pln = digitalRead(pin_pln);
  14.   bool dt_genset = digitalRead(pin_genset);
  15.  
  16.   Serial.print("pln: ");
  17.   Serial.print(dt_pln);
  18.  
  19.   Serial.print(", genset: ");
  20.   Serial.print(dt_genset);
  21.  
  22.   delay(1000);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement