srf485wpr sonars with C code

General & specific discussions on our Ultrasonic Rangers

Moderator: chris

srf485wpr sonars with C code

Postby marcusbarnet » Tue Apr 10, 2012 3:04 pm

Hi to all,

i'm developing a mobile robot application which has to use four sonars to avoid obstacles.

I've used four srf08 sonar which use I2C bus with Arduino and they worked very well.
Now, i've bought four srf485wpr because i want to use them for outdoor applications but i do not now how to use them.

Do you think it is possible to connect them to a PC and read their values with a C/C++ application under Linux/Ubuntu?
It would be awesome for me to be able to acquire this task, can you help me, please?

What kind of adapter do I need to connect four srf485wpr to my pc?
Is there some C sample code which can help me?

Thanks a lot, guys!
marcusbarnet
 
Posts: 7
Joined: Mon Oct 17, 2011 12:44 pm

Re: srf485wpr sonars with C code

Postby marcusbarnet » Tue Apr 10, 2012 3:07 pm

In the srf485wpr datasheet is written some C code, but it's a little bit difficult for me to understand it.

Do i need some library to get that code to work?
marcusbarnet
 
Posts: 7
Joined: Mon Oct 17, 2011 12:44 pm

Re: srf485wpr sonars with C code

Postby Gerry » Tue Apr 10, 2012 7:29 pm

Currently no Linux code, but we do have a complete windows program written in vc6 Its at the bottom of the tech page. Open the zip and you will find another zip inside it. Open that and you will see a .exe to run. It needs our USB-RS485 module to run. Full c++ code is also there.
User avatar
Gerry
Site Admin
 
Posts: 245
Joined: Wed Nov 08, 2006 12:28 pm

Re: srf485wpr sonars with C code

Postby marcusbarnet » Tue Apr 10, 2012 11:54 pm

If some windows C code is available, i can port it in Linux without problems.

I didn't find the tech page: do you mean this page? http://www.robot-electronics.co.uk/acat ... mples.html

I tried to find something related to srf485wpr sonars, but i wasn't able to find the correct zip file.
Can you give me the correct link, please?

If it will work, i can use the USB-RS485 module to chain all the sonars I need and poll them.
marcusbarnet
 
Posts: 7
Joined: Mon Oct 17, 2011 12:44 pm

Re: srf485wpr sonars with C code

Postby marcusbarnet » Wed Apr 11, 2012 12:20 am

I've found it at the bottom of this page: http://www.robot-electronics.co.uk/htm/ ... prtech.htm

I opened the zip file and i've found the other zip file you said.
I found also the exe file, but i realized that there is not C++ code in the archive.
I only found the Visual C++ code, but i can't use it in Linux since there is not main() function.

No C++ code has been written at the time?
marcusbarnet
 
Posts: 7
Joined: Mon Oct 17, 2011 12:44 pm


Return to Ultrasonic Sensors

Who is online

Users browsing this forum: No registered users and 0 guests

cron