|
ok i have been working on a robot. im using a ping sensor and a serial motordriver with a atom pro 24. since i got the bugs worked out with the motordriver and it works, i now can not get mi ping sensor to work. the code came from a post on here and it worked for 3 days then on friday of last week it stopped working. i havent changed a thing and it just wont either recieve the pulsout or idk what. now when i download the code for the ping after working on the motordriver, the ping wont work and my motordriver stays active??? could someone please give me a helpfull himt or an idea whats going on. im also using a atom pro-development board revB if that makes a diffrence. here is the code for the sensor and my motordriver.
ping: pingrange var long pingraw var long ping con p10 low ping high ping pulsin ping, 0, pingRaw 'read the ping low ping pingRange = pingRaw / 148 'convert to inches serout s_out, i9600, ["distance", sdec pingrange, 10,13]
motordriver: motordriver con p14 reset con p15
high motordriver 'take serial high low reset 'reset motor controler high reset' bring active high reset up pause 100' motor controller setup time
;forward: serout motordriver,i9600, [$80, 0, 4, 65] ;run the motor at full power serout motordriver,i9600, [$80, 0, 6, 65] ;run the motor at full power
|