New BS2P24
Earl Foster
Posts: 185
Besides changing the directive in the source code from BS2 to BS2P is there anything else I need to do for my code to work properly?· The reason I ask is because I have been running a my robot with a BS2 module for a while now and after upgrading his stamp and re-running the code he didn't work right anymore.· All of his sensors went crazy.· As soon as I replaced the 2P with the original stamp he starting working again.· I also tryed the BS2P in my Hex and it had problems too.
Any ideas? Stamp bad maybe?
Any ideas? Stamp bad maybe?
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
With the BS2
FOR counter = 1 TO 20
PULSOUT 13, 650
PULSOUT 12, 850
NEXT
With the BS2P
FOR counter = 1 to 20
PULSOUT 13, 384
PULSOUT 12, 502
NEXT
Let me also point out that your code will be easier to follow if you give your pins names, like this:
With servos, you could even do this:
·See how pin names and constant values make your code easier to follow?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office