Tuesday, 16 March 2010

first meeting

today we decided to use LDR sensors to guide the buggy around the course. we set about dividing the team into two. the first team consisted of juan and mosh created the circuit by using the lecture notes to firstly wire up the motors and then using the input analogue lecture notes to wire up an LDR (thermistor was replaced with LDR). The rest of us started making a simple program so that when the ldr was exposed to low levels of light as it would be when following the black line, the motors would be switched on, however when the ldr is exposed to higher levels of light the motors would be off. this was achieved by using a simple programs as follows:

main:

readadc 1, b1

select case b1

case 40 to 255

low 1

case 0 to 39

high 1

end select

goto main

No comments:

Post a Comment