Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Main program
- DO
- wdt_sleep
- TIMEOUT -= 1
- IF TIMEOUT = 0 THEN
- REPEAT 3 'resend LDR-value 3 times
- Ser1Send 35 '# (ASCII: 35)
- Ser1Print READAD10(ADC2, true)
- 'send the value from the LDR
- Ser1Send 59 '; (ASCII: 59)
- SWITCH = !NPN
- Ser1Print READAD10(ADC3, true)
- โBattery voltage
- SWITCH = !NPN
- Ser1Send 35 โ#
- Ser1Send 13
- Ser1Send 10 'CR/line feed in terminal
- TOGGLE = !LED
- END REPEAT
- TOGGLE = !LED
- TIMEOUT = MAX_NUM
- END IF
- LOOP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement