Pages: [1]   Go Down
Author Topic: IR distance sensor code (Sharp GP2D120 w/ Aduino Uno)  (Read 1772 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey! I have recently been interested in using an Infrared distance sensor to help guide an autonomous robot using an Arduino Uno microcontroller. I have not been able to find any code anywhere and I cannot program/code myself. Could someone help me out and find/make a sketch for me? It shouldn't be too much different from the sketch for a PING sensor; the only real difference is that my IR sensor uses infrared radiation/light whereas the PING sensor utilizes sound. I am using a SHARP GP2D120 IR Range sensor (4-30 cm range).
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey! I have recently been interested in using an Infrared distance sensor to help guide an autonomous robot using an Arduino Uno microcontroller. I have not been able to find any code anywhere and I cannot program/code myself. Could someone help me out and find/make a sketch for me? It shouldn't be too much different from the sketch for a PING sensor; the only real difference is that my IR sensor uses infrared radiation/light whereas the PING sensor utilizes sound. I am using a SHARP GP2D120 IR Range sensor (4-30 cm range).

Many beginners come to the arduino world with no prior programming language experience but manage to learn how to create their own sketches. What is preventing you from learning? There are lots of people here to help you with problems or questions as you attempt to learn to program your arduino projects. If you just have no interest in learning to program then I guess the help you might get will might often be less then you require.

Lefty
« Last Edit: November 22, 2012, 06:50:17 pm by retrolefty » Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8701
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you want a sketch modified it would help to know which sketch.  Which of the many Ping based autonomous robot sketches matches your robot hardware?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9470
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Some reading material:

https://www.google.com/search?hl=en&as_q=GP2D120&as_epq=&as_oq=&as_eq=&as_nlo=&as_nhi=&lr=&cr=&as_qdr=all&as_sitesearch=http%3A%2F%2Farduino.cc%2Fforum&as_occt=any&safe=images&tbs=&as_filetype=&as_rights=
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 200
Posts: 12773
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


@adlepotato51, PLEASE do not cross-post.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys!

Thanks so much for the help so far!
Sorry about the cross-posting, I just was really desperate for help and had no idea about how quick responses would be/if any of the posts would even be noticed/which category my problem was most relevant to (cross-posting is posting the same topic in multiple threads, right? I might be speaking about something else entirely otherwise).

And Lefty, I do intend to begin my study of basic Computer Science and writing Arduino sketches as soon as I can, but I am just so swamped with work at the moment that I cannot possibly try to learn/experiment until at least next semester. I need the data for this experiment as soon as I can possibly collect it, and if I were to try and write this myself, I'd have absolutely no idea where to even begin. The coding of my 'bot is really only for the purpose of getting everything up and running; right now I am most concerned with the actual application/comparison of the sensors. I was just hoping that I could find a temporary sketch (like the already existing PING one) that would help me test run my project before making one myself.

And the sketch for PING that I speak of is just the basic example sketch that's included with the Arduino software.
« Last Edit: November 22, 2012, 11:50:28 pm by adlepotato51 » Logged

Pages: [1]   Go Up
Jump to: