Arduino Sonar Buzzer PHP Twitter Thingy

Arduino Sonar Buzzer PHP Twitter Thingy

i haven’t posted in a while, but that doesn’t mean i haven’t been doing cool stuff in what little spare time i have. i thought i’d finally record one cool project i finished.

i’m not sure what to call it other than “dynamic awareness”. in a nutshell, i interface a Maxbotix LV-EZ2 ultrasonic range-finder to my arduino diecimilia, along with a generic buzzer.

using serproxy, i channeled serial data running through my computer to network traffic. on my machine running a wamp server, i wrote a few php scripts to read the values and with ajax (using jquery) change the color of the screen to green (the farther you are) to red (the closer you are). also, the closer you get, the smaller you get.

and of course, what would a project be like these days without something twittering. you can see what this project twitters here. basically, i operated under the assumption that the closest thing to a realistic use of this system would be twitter whether or not you are at your desk.

so what does this thing do again?

arduino & sonar returns your distance away from the computer and it is displayed on the screen. the farther away you are from the computer the larger the text and the greener the screen. the closer you are, the smaller the text and the redder the screen. get within 5 inches and a buzzer alarms. distance is twittered.

how did i do the color changing?

i just used jquery to dynamically tweak the background rgb values based on the % change in distance from the screen. rgb(red,green,blue)

where’s the source?

you can download it here.
For now, the source is not available. However, if you want it really bad, you can email me and ask for it.

watch the video of how it works


arduino sonar buzzer php twitter from Joshua McGinnis on Vimeo.

Published byJosh McGinnis

Josh is a software engineer, leader, startup advisor for the LA Chamber of Commerce and consultant residing in the Los Angeles area. Josh is passionate about helping entrepreneurs and businesses reach their maximum potential.

20 Comments

  • Distance detecting pc - Hack a Day

    March 26, 2009 at 4:33 pm Reply

    […] sent in his latest project. using a sonar rangefinder, an Arduino, and some clever programming, he’s made is computer react to his distance from it. As you can see in the video after the jump, he has programmed it to change text size and […]

  • […] Toutes les infos et les source pour le kit arduino sont disponibles sur le site de Joshua McGinnis […]

  • Distance detecting pc | News for Geek

    March 27, 2009 at 2:23 am Reply

    […] sent in his latest project. using a sonar rangefinder, an Arduino, and some clever programming, he’s made is computer react to his distance from it. As you can see in the video after the jump, he has programmed it to change text size and […]

  • PlastBox

    March 27, 2009 at 3:44 am Reply

    I just have to say, this is pretty cool! But then I love anything that includes some cool hardware, custom software, php and ajax/jquery! ^^,

  • […] More about the Arduino sonar buzzer and PHP twitter thing […]

  • […] More about the Arduino sonar buzzer and PHP twitter thing […]

  • […] More about the Arduino sonar buzzer and PHP twitter thing […]

  • […] More about the Arduino sonar buzzer and PHP twitter thing […]

  • Daniel Friedman

    March 29, 2009 at 2:23 am Reply

    I did a similar thing with an ir sensor with my mac, and used it to change songs on itunes, or the volume depending on how close you placed your hand to the sensor

  • RR

    March 29, 2009 at 5:59 pm Reply

    I think you have a realistic use case for the system right there on that video. Just replace that text with a stream of tweets or something else you want to follow, then you can see it comfortably from anywhere in the room. If you need to see more content, just come have a closer look at it.

    Comfortably browsing at the desk or sitting on a couch 10 feet away. I would like that very much.

  • JB

    March 29, 2009 at 6:32 pm Reply

    This could have a variety of uses. Its not nearly as useless as it looks. if you can get it to detect from a long range (i’m not sure it can) then it can change font size or zoom in any program according to distance, keeping it constant. As Daniel said, volume could work with this too. It could automatically log on/wake up/un-screensaver(is there a word for this?) as you approached your computer, welcome voices (“Hello Master Joshua”), and anything else you could think of.

  • […] sent in his latest project. using a sonar rangefinder, an Arduino, and some clever programming, he’s made is computer react to his distance from it. As you can see in the video after the jump, he has programmed it to change text size and […]

  • NerdNews.it

    March 30, 2009 at 11:20 am Reply

    A che distanza siete dal pc? Arduino Sonar Buzzer…

    Con questo interessante progetto potete far conoscere al vostro pc quanto siete lontani dallo schermo! Immaginate di allontanarvi dal pc vedendo magicamente ingrandirsi i font delle pagine web che leggevate…
    Il progetto, non troppo difficile, com…

  • morsey

    March 30, 2009 at 11:27 am Reply

    interesting. another feedback loop for the computer itself so the user can interact with it, and it can interact with the users space.

    it’s small things like this that become huge steps forward

  • cnawan

    March 30, 2009 at 9:09 pm Reply

    Ooh, that’s nice – I was daydreaming something similar a while ago, but more from a wearable computer standpoint.

    Some possible use cases:
    * Put one or two of these on your hands and use them to modulate a sound – everything could be your theremin.
    * Maybe you’re an urban explorer and you’re afraid of hitting your head on a low ceiling – attach it to your head and you’ll get a ‘beep’ when you’re about to hit the roof.

  • […] an ultrasonic range finder modules from SparkFun and Arduino microcontroller as the controller, Josh over at blog.joshuamcginnis.com has created an awesome DIY sonar distance Twitter buzzer that will tweet the distance he’s […]

  • […] [link] | [via] […]

  • troy nall

    June 29, 2009 at 2:40 pm Reply

    i was wondering what it would cost to get you to manufacture one of these for my paranormal group ? we could easily implement this into our investigations and Im sure I can modify the PHP could to write to a file as a log.

    could you subsitute a aurdino clone(Product #CGBBB Bare Bones Board Arduino Clone Kit) in place of your arduino decimilia ?

    troy nall
    troyleenall@gmail.com

  • Project: Distance Detecting PC

    August 29, 2009 at 3:15 pm Reply

    […] Project Link: Distance Detecting PC […]

  • Frankie

    July 31, 2012 at 9:48 am Reply

    Do you still have the source code up? Would be great if you could share.

Post a Comment