This is my first topic and post here.
Sorry for my poor english:)
Im trying to build a car with ultrasonich range finder. I have found a schema here: (due to forum rules i will paste the link in next post)
I've just bought the parts for it but i have no idea how to operate it with arduino. I have realised to late that the program below schema is in 'pure C'. Can anyone help me and tell how can i use this sensor with my arduino (i have UNO version but i think it doesnt make any difference)?
Strip out the LCD code, use the tone library for the pulse generation and ditch the timer handling for a simpler 'micros()'-based timeout.
The ADC handling could be streamlined a little so that you don't switch the input mux every time.
Don't know how well it would work though - I don't imagine the range or resolution would be that great.
Maybe experiment with something like a MAX232 to put a bit more oomph into the tx pulse.
It is not the simplest of tasks converting one code to another when you know nether. Take time to learn arduino code, do some of the tutorials and write some stuff of your own before tackling this. Then you will have the tools to do it.
oops, i take that back. That's a home-made ultrasonic rangefinded based on the PIC. I bought mine for $15. I have enough trouble coding for the carbot.
The AVR processor is more than capable of running the sounder, but I wouldn't set out on this unless you have access to, and know how to use, an oscilloscope.
@bill2009
yeah, i have realised i can buy completed sensor to late...
@Groove
Hmm i think its a bit more than 'making sounds'- there are timings, pulses etc..
Yes I was working on oscilloscope and know how to use it but unfortunately i have not any access to it..
'there are timings, pulses etc'
And you thought sounds were ...what, exactly?
The transmitter isn't your problem (you could easily do that with a 555 or software), it is the receiver, and milli or microvolt strength of the return, without amplification.
I haven't done much with home-brew ultrasonics for many years, but I do remember that both the transmitter and receiver transducers resonate very strongly, so make sure that your transmit code is capable of minor tweaks of frequency, even at the expense of a symmetrical waveform.