Im trying to get my ping sensor to work with my BS2 but the sample code that was included with the sensor doesnt work. It keeps giving me syntax errors when it should be. Does anyone have some working code that I could try out just to make sure the sensor it working right?
Did you try using this?
parallax.com/detail.asp?product_id=28015
(the zip file near the bottom)
If that’s not working, make sure that your declarations in the begining are correct.
I believe that the correct declaration for the regular Stamp 2 is:
{$Stamp BS2}
{$PBasic 2.5}
If that’s not working… well I can’t help.
Thats the same code that came with the ping. But for some reason it works and the stuff that came with it doesnt. Weird, thanks for the post.
That is weird. can you post the code that came with the ping? There has got to be something missing or a character that is out of place some where in the code.