Let's Make Robots!

picaxe 28x1 with srf08?


im trying to connect the srf08 to my picaxe, no luck so far.


i connected it like in pic.jpg

i know the red and yellow lines are correct. what about blue and green?


ad for software im really lost.. any document ive seen uses different commands

 if you can tell me the right commands for range finding or givir a sample of a code that would be much appreciated

 thanks in advance, shaked,

pic.JPG69.82 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

i just noticed that the reset button has a 4.7k ohm resistor.

(http://www.rev-ed.co.uk/docs/AXE020.pdf , page 2) 

so i was thinking:

switch between the 10k resistor that is connected to the inputs with the 4.7k resistor that is connected to the reset.

what do you think? something wrong can happen?

(i dont care if the reset button wont work)


I think you should go buy a couple 4k7 resistors, as you need 2, not just one. Or at least find some none-working elelctronics to desolder some from.
I agree. Buy some 4k7, 10k, and 330 ohms resistors you will use them a lot and they are cheap.

if you really need them and dont want to purchase i can send you a small grab bag of resistors including some 4.7K ones

i have a ton of resitors that i couldnt even imagine using all of them 

plus i have some goldmine-electirc grab bag boxes coming with a ton of parts (33LBS)

thats very kind of you but i live in israel so inernational shipping for resistors is kind of an overkill

ill get them till next week or something and ill update if anything will start to work



its seems that  this black row of things with 9 legs is actually 8 resistors of 10k ohm!!!

stolen picture from the start here guide

ive never seen anything like that and it took like 2 hours that will never return to me (changing switching other resistors for nothing!)


Yes, the 10k resistors were already mentioned in this response to your previous inquiry. The problem with them is that they are tied to ground, not to +5, as is needed for I2C to operate.

Is there no bits of electronic junk laying around that might have these resistors on?  A great robotic lawnmower is made in Israel. And I don't know why Farnell Israel would have high shipping to Israel, since it's already there. Avnet appears to be there too. Another might be Odem, and there might be a retail shop. There was mention of even a Radio Shack in Israel, but they may have closed since the company isn't doing so well.


my idea is to rip off the black 10 k resistor and connect the 4.7k from the inputs to the sensor directly

 think something should be inserted instead of the 10k resistors, and i dont know what, maybe a regulare wire?

if im gonna make this thing work im gonna make a how to guide  !

This probably should have been posted on your earlier questions on I2C and SRF08 on the PICAxe.

 The first thing pictured in the PICAxe I2C tutorial is the need for 4k7 pull-up resistors on both SDA and SCL. These need to be added to your circuit.

I don't have a PICAxe, never programmed one, but perhaps something close to the following might work


i2cslave $E0,i2cslow,i2cbyte ' set up i2cslave for SRF08 default address E0, try slow to start


writei2c 0,(81) ' send command to pulse, return range in centimeters
pause 10 ' wait for SRF08, may not be needed
readi2c 2,(b0, b1) ' get range data back into 2 byte variables

debug w0 ' should display b0 and b1 as word, centimeters



is there any way to merge the posts?

do you agree with how i connected the wires?

do you think i should replace the 10k ohm resistor that is connected to the inputs with a 4.7k ohm one?

i am not sure it will not affect anything else..

 with the system connected as before  the debug widnow is poping up but its in "waiting..." mode and never updates

thanks again