Wednesday, 9 June 2010

Friday, 30 April 2010

Experience

Overall the robot project wasn't successful but it was quite a fun to go through all the process.I also realized that there were many things to consider practically such as installation of motors, building up circuit by soldering and putting all parts together.This experience hopefully would be helpful in the future work.

circuit diagram


Code

main:
high 5 ; for LEDS
high 6
readadc 1, b1
readadc 2, b2

select case b1
case 82 to 255 ;LDR doesn't detect light
low 2
high 1
case 0 to 81 ;LDR detects light
high 2
low 1
end select

select case b2
case 56 to 255 ;LDR doesn't detect light
low 4
high 3
case 0 to 55 ;LDR detects light
high 4
low 3
end select

debug b1
debug b2

goto main