Archive for the ‘Technology’ Category

Hook up your child’s ball path (or anything else) to Twitter

Sunday, November 20th, 2011

I wanted my son to know whenever I leave work to come home. With a fairly simple Arduino setup the ball of his ball path will be set into motion as soon as one of my tweets contains a certain hashtag.

The code is based on the Pachup example that you can find in O’Reilly’s Arduino Cookbook by Michael Margolis in chapter 15.15 (Download the example code at oreilly.com). To learn more about the wiring you could start at the Analog Input to Servo-Sketch at fritzing.org.

Parts:

  • Arduino Uno (Sparkfun’s SKU: DEV-09950)
  • Arduino Ethernet Shield (Sparkfun’s SKU: DEV-09026)
  • Servo Motor
  • Network Cable
  • Power Plug for the Arduino Uno
  • A ball path

(If you need a shortcut, get the Fritzing Starter Kit.)

Step 1:
Figure out a way to release the ball of the ball path using the servo motor. In my case it was pretty simple. I could make it look nicer, but for the time being the solution presented in the picture below will do.

 

Step 2:
Add the following libraries to your Arduino IDE:

Step 3:

  • Open BallPath_Version1.pde in your Arduino IDE
  • Modify the two variables [YOUR_TWITTER_ID] and [YOUR_HASHTAG]
  • Compile it and send it to your Arduino Uno.

Step 4:
Add the Ethernet Shield on top of the Arduino Uno and wire the servo motor according to the sketch below.

  

Step 5:
Hook up your Aduino to your network and attach the power plug.
Your Arduino should be booting now. The servo motor will stay at an angle of 10° until the IP address is received. In case the DNS lookup failed, the motor will be turned to 50°. (In case you need more than this servo-based logging change the value of “loggingEnabled” to TRUE and open the serial monitor of the IDE.)

Result:
Now you’re done. The code will check every 8 minutes for a new tweet with the hashtag specified. (If you would like to increase that value please make sure to check the API documentation for the max-request value.)
As soon as the Arduino receives a search result containing your hashtag the servo motor will be turned to 180° to release the ball. You might have to change this value according to your needs.

The video below demonstrates the systems.

If you find any bugs or if you improved the code, please let me know. Any feedback is welcome.

Rabbits on Ruby

Wednesday, April 29th, 2009

How my green RFID-Rabbit learned to talk to Ruby on OpenBSD:

  • Connect the USB-mir:ror to the computer (in my case, it’s my ALIX)
  • #git clone git://github.com/leh/ruby-mirror.git
  • #dmesg | grep Violet
    uhidev0 at uhub1 port 1 configuration 1 interface 0 “Violet Mirror” rev 1.10/1.00 addr 2
  • # sudo chmod o+r /dev/uhid0
  • # vi bin/ruby_mirror >> change device-path to /dev/uhid0
  • # sudo ruby bin/ruby_mirror examples/bunny.mir
    hey d002xxxxxxxxxxxx, never seen you before

For more information refer to ruby-mirror and to Mir:ror.

[To be continued soon.]

29042009(001).jpg

DacBookHair – Dell Mini 9 and OS X

Wednesday, April 29th, 2009

I sold my Eee PC and got a Dell Mini 9”.

After a couple of hours of reading forum entries and watching progress bars OS X is running smoothly on the system without any glitches.

25042009(005).jpg

Notes:

  • To free more space on your system get a copy of Xslimmer.
  • Don’t forget to disable the “USB Legacy Support” after installing the system. Otherwise the system will not sleep.
  • Optimize your colors: Preferences >> Display >> Dell Mini-Settings
  • Bluetooth is working, but it can’t be switched off.
  • Attaching an external display is not a problem!
  • Multitouch is not working yet.

Finally I outpaced Dell’s stupid nomads at http://www.digitalnomads.com/ ;-)

ALIX.3C3, OpenBSD, a NAS, cron and Time Machine

Tuesday, April 28th, 2009

Most of the time I know something about the stuff I buy, but in this case it was a little different: I got an ALIX.3C3 to use it

  • as a NAS (to us it with OS X Time Machine and the Air Disk Hack)
  • as a fancy cron-controlled alarm clock
  • and as a littel web server for testing purposes.

I realized a little too late that Debian-Linux doesn’t really work headless (w/out a monitor) with the ALIX. This cost me quite some time. Luckily my friend and co-worker Tom convinced me to install OpenBSD on the ALIX. Alone, I would have never made it that far.

There were a few pitfalls and little pieces of wisdom that I found along the way that wanted to share. Hopefully this blog entry will help someone else on her/his path:

  • Don’t use Debian with a headless ALIX (3C3)! It won’t boot unless you do stupid hardware hacks .
  • OpenBSD is NOT evil and it is not difficult to understand. Find someone who knows the system, get him a sixpack of beer and inhale all the knowledge that the beer set free.
  • cronjobs need to address shell scripts or programs with the full path (I don’t know why it took me so long to find that out, duh)
  • mplayer can stream music to your Apple Airport Express Station – don’t even bother about setting up the sound card etc.: # mplayer -ao rtunes:device=192.YOUR.APX.IP:af=inet musicfileOrStreamUrl.mp3
  • http://www.openbsd101.com/ is very usefull, but updating upgrading from a snapshot to a stable version 4.x (replace the x with the desired release version) of OpenBSD can be done quicker – Thanks again, Tom:
    • # ftp ftp://ftp.openbsd.org/pub/OpenBSD/4.x/i386/bsd ftp://ftp.openbsd.org/pub/OpenBSD/4.x/i386/base4x.tgz  ftp://ftp.openbsd.org/pub/OpenBSD/4.x/i386/comp4x.tgz ftp://ftp.openbsd.org/pub/OpenBSD/4.x/i386/man4x.tgz  ftp://ftp.openbsd.org/pub/OpenBSD/4.x/i386/misc4x.tgz
    • # cp /bsd /obsd (backup your kernel)
    • # tar xzpf base4x.tgz -C / (extract the archives to /, keep all rights)
    • # tar xzpf comp4x.tgz -C /
    • # tar xzpf man4x.tgz -C /
    • # tar xzpf misc4x.tgz -C /
    • # cp bsd /bsd (copy your fresh kernel to its final destination)
    • # config -e -o /bsd /bsd (optinal: add 15% RAM to the cache of the file system)
      cachepct 15
      quit
    • # reboot
    • Adjust the PKG_PATH in ~/.profile to your the path of your version
    • Exit, log in again, done.
    • Yes, you are right: You can just replace the whole system and then reboot it. Try this with any other system and you will #fail! ;-)
  • systat is a cool command

Sidenotes: The ALIX is equipped with a 4 GB Compact Flash Card. 4 GB is more than enough; currently not even 1 GB is used. In addition I attached a 2.5”-USB harddrive for my Time Machine backups.

11032009.jpg

Next project: Adding the Mir:ror as an interface to set the alarm clock using ruby-mirror.

iPhoto Faces Accident

Sunday, February 15th, 2009

iPhoto Faces Accident

How do I unlock the hidden Secret Service Power Edition of iPhoto’s face recognition? The consumer version is not working as I expected.

Finally: A Useful Application for a Whiteboard

Thursday, January 15th, 2009

ArtFall is an interactive installation that allows visitors to create a dynamic physical simulation by drawing on a whiteboard.

See the details at exothermia.net/monkeys_and_robots/2009/01/08/artfall/

(via:Gretel)

More Noise!

Friday, November 21st, 2008

Opened my twitter feed. Hello world.

DIY Day: Replacing the broken harddrive of my 12” Powerbook

Saturday, October 25th, 2008

12'' Powerbook taken apart
12'' Powerbook taken apart
12'' Powerbook taken apart

Replaced a broken harddrive. Thank you, iFixit.com!


Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.0 Germany License.

Switch to our mobile site