Very cool looking robot. Add Very cool looking robot. Add some fur and you have a puppybot. Someone has ping code here somewhere. Unfortunately I haven’t used a ping only srf05.
Slick looking bot! I had the Slick looking bot! I had the zero read problem with mine too. Check the voltage being fed to the ping, it should hover around 5v. see if your led is flashing on the right intervals too (every low-hi-low sent)
V+ is right at 5.9dc and the V+ is right at 5.4dc and the light on the ping flashes every .5 seconds, so it’s triggering. I’m just unable to get a reading. Not sure what’s up -
disconnect your servo and see if readings change, also try move your "sertxd ("The value is ",#W0,cr,lf)" i found that dit actually makes a difference where i place the debug output command. hmm what else…you could try lengthen the 500 delay.
also give this a try, omit the last low:
LOW PORTC 0 HIGH PORTC 0 PAUSE 1 LOW PORTC 0 LET DIRSC = %00000000 PULSIN 0, 1, W0
I have the ping working independantly. Using code I can slew the servo, take a reaning and it’s quite accurate. The difficulity is when the main motors are running there’s a nasty timing issue that I haven’t traced down yet.
Secondly, I may have to implement an encoder for each motor - the legs get out of sync and the bot vectors instead of walking in a straight line until they sync up again. If I leave it “as is”, I’ll have to rename it DrunkBot.
Anyone have some working ping code they could post (nav code, with motors running)?
Here’s some quick sloppy code for test of servo slew and ping function (remember to press F8 to get a terminal window).
+++
main:
servo 0,150
pause 500 LOW PORTC 0 HIGH PORTC 0 PAUSE 1 LET DIRSC = %00000000 PULSIN 0, 1, W0 sertxd ("The center value is ",#W0,cr,lf) pause 500 ‘ short delay
Do you have it all on the Do you have it all on the same batteries? If so try putting the motors on a secondary power source. The motors may be getting different voltages when the sensor is working.
Well, I have an Epilog Helix with a 24"X18" bed size, so I can cut at any one go up to that size. Plexi (perspex) is routinely sold in 12" X 12" and 24" X 12" as standard. CAD drawings work fine, but I convert them so they have contiguous lines with no gaps. EPS works well also and I rarely have to touch them. Corel Draw vector files are easy for me to work with as well.
I got burned paying $5 for the ping servo bracket, but never again - I think I can bang up a life time supply in plexi (perspex) in about five minutes of cutting time - think I’ll get started on that.
Awesome! I’m making the same offer, I’d love to cover the cost of everything and throw in some extra for beers, as long as you don’t go and buy something gross like Bud Light or any Miller products.
I just downloaded the program, now let’s see if I can learn it!