Step 3The code
Let it be said; I'm a terrible coder and there are thousands of ways to do this better. The code is ugly but but it works and can be snatched below.
The red standby-Led helps in confirming that the program is running:
standby:
high 5
pause 100
low 5
pause 300
goto main
When a text or call is received a LED connected to the speaker output shines onto the LDR (light dependent resistor). The value is then read:
readadc 2,b0
if b0 < 90 then standby
if b0 > 90 then run
The start of the "run" command:
run:
wait 2
high 3
pause 100
low 3
pause 400
wait 6
high 1
pause 100
low 1
pause 300
high 2
high 1
pause 100
low 1
low 2
pause 300
Code.txt2 KB| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|











































