Go Down

Topic: IR distance sensor code (Sharp GP2D120 w/ Aduino Uno) (Read 2220 times) previous topic - next topic

adlepotato51

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).

retrolefty

#1
Nov 23, 2012, 12:48 am Last Edit: Nov 23, 2012, 12:50 am by retrolefty Reason: 1

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

johnwasser

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?
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

zoomkat

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=
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

Coding Badly


adlepotato51

#5
Nov 23, 2012, 05:48 am Last Edit: Nov 23, 2012, 05:50 am by adlepotato51 Reason: 1
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.

Go Up