Montag, 28. Oktober 2013

This time no Arduino - but Raspi scares kids on Halloween :-)

This video shows what I have done for Halloween with a Rasperry Pi (I know that it is dark... this is only an example for the show we made yesterday):






I used the following hardware:

  • Raspberry Pi
  • WLAN USB stick
  • FTDI-RS485 USB adapter for connecting to DMX light hardware
  • Speakers
  • Cables like Power, DMX, ...

... and the following software:

  • SD Card with Raspian
  • OLA daemon see http://www.opendmx.net/index.php/Open...
  • self written C++-daemon for sending DMX data to OLA as middleware (the daemon accepts simple commands for setting modes and values for each DMX channel and can play fades as a background thread - totaly detached from the controlling software; the interface is a simple UDP network connection).
  • self written Perl-script for firing up sounds and light commands to my daemon
The Raspi is configured as a WLAN hotspot, so I can log in from the kitchen without having cables through windows or doors. The audio files and programs are installed on the Raspi.

The program plays a storm sound in the background and makes color changes on the spot and LED-Bar - you can put much more lightning or DMX addressable equipment to the show if you have... . With shortcuts on the keyboard I can play some more scary sounds.

The special fun is the key "G". When pressed the spots are fading to dark and radomly they are flashing white. After that a thunderstorm sound is played.

If you have any questions about this project, feel free to caontact me!

Happy Halloween :-]

Mittwoch, 16. Januar 2013

Arduino drives digital locomotives (Maerklin Motorola II)

After trying to write my own interrupt timer service sketch for generating Maerklin Motorola (II) protocol for my model railroad I found a message from a guy who had done this already: http://forum.rocrail.net/viewtopic.php?t=4583 (sorry, german only). We changed some email an I tried to get his sketch running. After some (self made) trouble it works fine for me. The code was working but it was not very good organized. So I asked him to make a Sourceforge project of Maerklino (now it is called Ardurail to avoid traddemark problems) and began to rewrite.

And here it is: https://sourceforge.net/projects/ardurail/

Until now we haven't released any files but you can check out the (hopefully) working development version from SVN. The last changes I made were to put the whole code into a class so that it later can be distributed as a simple library. Also I added some functions for better control of the devices.

The next step will be (after testing the actual code): Writing a derived class which implements the P50 protocol (currently it is a method inside the class) and than a derived class for SRCP (see http://srcpd.sourceforge.net/srcp/).