Advertisement
Guest User

Untitled

a guest
Apr 1st, 2020
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'Main program
  2. DO
  3.     wdt_sleep
  4.     TIMEOUT -= 1
  5.     IF TIMEOUT = 0 THEN
  6.         REPEAT 3                       'resend LDR-value 3 times
  7.             Ser1Send 35                '# (ASCII: 35)
  8.             Ser1Print READAD10(ADC2, true)
  9. 'send the value from the LDR
  10.             Ser1Send 59               '; (ASCII: 59)
  11.             SWITCH = !NPN
  12.             Ser1Print READAD10(ADC3, true)  
  13.  โ€˜Battery voltage
  14.             SWITCH = !NPN
  15.             Ser1Send 35                โ€˜#
  16.             Ser1Send 13
  17.             Ser1Send 10               'CR/line feed in terminal
  18.             TOGGLE = !LED
  19.         END REPEAT
  20.         TOGGLE = !LED
  21.         TIMEOUT = MAX_NUM
  22.     END IF
  23. LOOP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement