Borked PING?
Oldbitcollector (Jeff)
Posts: 8,091
With my robot building this weekend, I'm finally getting around to a proper test of that PING sensor
I received as a gift from the spouse....
I'm feeding it 5v,Gnd, and SIG to the prop via 1k resistor.
Using Mike's BOE-BOT-BASIC, it looks like I get 1 good reading from it when I reset the Prop.
After that, any continued readings don't flash the ACTivity light, and all report back the same as
the first.
Does the sensor sound shot or is there a way to reset it?
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
Need a part? Got spare electronics? - The Electronics Exchange
I received as a gift from the spouse....
I'm feeding it 5v,Gnd, and SIG to the prop via 1k resistor.
Using Mike's BOE-BOT-BASIC, it looks like I get 1 good reading from it when I reset the Prop.
After that, any continued readings don't flash the ACTivity light, and all report back the same as
the first.
Does the sensor sound shot or is there a way to reset it?
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
Need a part? Got spare electronics? - The Electronics Exchange
Comments
BOE-BASIC:
10 A=PING
20 PRINT A
30 PAUSE 200
40 GOTO 10
I figure that this would recalculate the distance each time it loops, no?
I'm getting nothing but backup and re-eval from your sample program.
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
Need a part? Got spare electronics? - The Electronics Exchange
10 REM Start the PING cycle
20 PING
30 REM Now wait for it to finish
40 A = PING
50 IF A = 0 THEN GOTO 40
60 PRINT A
70 PAUSE 200
80 GOTO 10
Thanks Mike!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
Need a part? Got spare electronics? - The Electronics Exchange