Skip navigation

Hey everyone just a a sneak peak at whats to come Some of the wiring may or maynot be correct but here are some of the components we will be using with our pi dozer.

Right now we are prototyping fixing some bugs. Hopefully soon everything will be done and we will have an extensive post coming for you.





Here is a Gear we drew up in Solid works that will be driven by a windshield wiper motor. To control the Dozer.




I decided to set up my Raspberry PI as a dedicated LAMP server. (LAMP is an acronym that stands for LinuxApacheMysqlPhp and are components required to run a Dynamic HTML webpage.).


All these components are Open Source ;


  • Apache is the webserver that will host my applications - for more information see
  • MySQL is "the world's most popular Open Source database" (their own claim !) - more information here
  • PHP is "a popular general-purpose scripting language that is especially suited to web development." (again their own claim !) - see



Before you start, it might be helpful to assign your Pi a fixed IP address - if you haven't done this already, see my post on how to do so at You will need to know your Pi's address in order to access the server once you have installed it!The first step is to make sure the OS is up to date (good practice before making any PI upgrades) so I ran the following commands ;

  • sudo apt-get update
  • sudo apt-get upgrade


Step 1 - install Apache


Install using the following command;


  • sudo apt-get install apache2 php5 libapache2-mod-php5


Once that has completed, start the serber using the following command


  • sudo service apache2 restart


To test that the server is running, type your Pi's IP Address into the browser, and you should get a simple page displayed - e.g.


It works!

This is the default web page for this server.

The web server software is running but no content has been added, yet.


Although Apache is all working at this point, there are a few configuration changes you can make to improved this - see the 'More Infomation' section at the bottom of this page.



Step 2 - Install MySQL


Use the following cmannd to install the MySQL database


  • sudo apt-get install mysql-server mysql-client php5-mysql


During the install a prompt will pop up asking you to supply a password for the database root user - enter something appropriate !


Once the install is complete, the database will be up and running. To test this use the following to get comand line access to the database


  • mysql -u root -p


You will be prompted for the root password that you assigned above. You can use this utility to run SQL commands to create users, table, etc.


If you want to use a MySQL client there are several free ones available - I use Heidi (see If you want to do this you will need to do the following steps


  • Configure MySQL to use the Pi's IP Address
  • Create a database user for you client PC


Configure MySQL


Edit file my.cnf in /etc/mysql - i.e


cd /etc/mysql sudo nano my.cnf


Look for the entry bind-address and edit it to be the Pi's ip address - e.g.


bind-address            =



Create a database user for your client PC


You need to use the SQL client on the Pi to add a user for your client PC. You will need to define a user and password - these will then be the credentials that you use in your SQL Client. In these examples I am using user root and password password - I suggest you choose something less obvious!


Use the following command on he Pi to open the MySQL client


  • mysql -u root -p            (You will need to supply the MySql root password when prompted)


Enter the following, substituting your own user and password values that you want to use - don't forget to surround the values with quotes and terminate with a semi colon.


CREATE USER 'root'@'' IDENTIFIED BY 'password';


Note that in the above is the ip address of my client PC, not the Raspberry Pi !!


You will also probably want to create a database to use (MySql isn't much use without one !) - again you have to then assign privileges to your client in order to use it.

You might as well do this at this point, with the following sql commands on the Pi;


CREATE DATABASE petersdb; GRANT ALL PRIVILEGES ON 'petersdb'.* TO 'root'@'' IDENTIFIED BY 'password';


(Again, don't forget the quotes and terminating semi-colons!)


Having done all the above you can now use an SQL client on your PC (e.g. Heidi - see to connect to the MySQL instance on the Pi - you will need to supply


  • The IP Address of the Pi
  • The user and Password that you specified in the CREATE USER command above


Once you have done this you will need to restart MySQL - either reboot the Pi, or use the following command


  • sudo service mysql restart


*Edit* - try using PhpMyAdmin !


If you want to make managing your database(s) at lot easier, try installing PhpMyAdmin. There's some really good instructions available at


Step 3 - Install an FTP Server


Its very hard to utilise a web server effectively without being to put files on it! - so we need to install an FTP server. as follows


Change ownership of the web root, and then download the ftp server as follows. Note that if this is going to be a public facing server you need to create a new user and password to use - dont use the default pi/raspberry !!


  • sudo chown -R pi /var/www     (substitue the user you have cretaed for pi in this command)
  • sudo apt-get install vsftpd


Now we need to edit the conf file as follows.


  • sudo nano /etc/vsftpd.conf


Find and edit the following lines as specified:


  • Change anonymous_enable=YES to anonymous_enable=NO,
  • Uncomment local_enable=YES
  • Uncomment write_enable=YES
  • then go to the bottom of the file and add force_dot_files=YES


When you have done the above restart the FTP server using


  • sudo service vsftpd restart

Having done this you can now FTP to the PI use a free client such as FileZilla (see


You will ned to supply the following values

  • IP Address of your Pi
  • User and Password - this is the pi user and password that you use to log on to the pi - e.g. pi and raspberry by default. If this is going to be a public facing server, change your password !!!!



More Information


  • Apache configuration

Apache will work 'out of the box' as installed above - however this is a default configuration, and you can tidy it up a bit.


If you restart Apache (using the command sudo service apache2 restart) you will see an error along the lines of Could not determine the server's fully qualified domain name, using 127.0.X.1 for ServerName.

This is because the Pi hasn't been set up as a named server. This can be done quite easily - all you need to do is decided on a name for your server, and to know your IP address.


For the following instructions I have chosen to call my pi lamppi - and my IP address is


N.B. To edit files use sudo nano filename - e.g. to edit file hostname in directory /etc;


cd /etc sudo nano hostname



Edit file hostname in directory /etc to contain the entry as below (using the name you have chosen for your server).



Edit file /etc/hosts as below. you need to


  • Add a localhost entry for your IP address (e.g. localhost)
  • Add an entry for your chosen server (e.g.    lamppi)
  • lamppi_2.png

Next, create an extra file servername.comf in the /etc/apache2/conf.d. You can use nano to create the file - i.e


  • cd /etc/apache2/confd
  • sudo nano servername.conf


Create an entry as shown below




You should now find that you can stop/restart apache without any errors being thrown.






Helpful commands


Restart MySQLsudo service mysql restart
Update OS
  • sudo apt-get update
  • sudo apt-get upgrade







I've been blogging about my experience in Road Test reviewing the Ultimate Raspberry Pi Bundle. As a part of this Road Test I'm creating a Fridge/Freezer Temperature Alarm system for our local food shelf, Channel 1. You can see where this Road Test started for me here


Since my last post I've been busy, last weeks on FIRST Robotics, but I managed to order some temperature sensors and get them working with the Raspberry Pi! So I'm quite close to my target project the temperature sensor/monitor for our local Food Shelf known as Channel One (and in the last week they've had another weekend outage, and another loss of food, so these sensors can really fill a need)

Previously I used the PiFace Control and Display to create a Raspberry Pi Powered Joke Machine - The Ultimate Raspberry Pi Bundle

for the Channel One Temperature Sensor I cracked open the Adafruit version of an LCD display (also included in the Ultimate Raspberry Pi Bundle) It's known as the Adafruit RGB Positive 16x2 LCD + Keypad Kit for Raspberry Pi I was glad I did too, for the following reasons:

  • The Adafruit LCD Plate is mutli colored, you can programmatically change the LCD background to 7 different colors. I decided to use the color feature to my advantage, my Temperature Sensor is normally Green, and I change it to Red if the temperature is too hot, and blue if the temperature is too cool
  • The Adafruit LCD features a nice set of Tutorials right on the product website and one tutorial was almost exactly what I was looking for, it explains how to use the DS18B20 1-wire temperature sensor and the Pi and PiPlate. I simply had to modify things slightly to use 2 sensors and then figure out how to use the LCD display as well.
  • With the PiFace I was wondering how to tap into the open ports after the shield was plugged in, Adafruit pointed out a neat device that could be used to make things easier here...stacking headers
  • Assembly instructions were very clear and easy to follow even though the pcb had been recently rearranged.
  • The Adafruit LCD does not have the IR sensor found on the PiFace CAD, or the extra togglebutton. However for this project I didn't really need those features
  • The Adafruit LCD buttons are controlled by polling instead of the event driven design found on the PiFace CAD. This is significant, for example I wanted to have a button that cancels the temperature sensor...if the buttons were event driven this would be easy, but since I have to poll the buttons with the Adafruit design, I'll need to poll temp sensor one, temp sensor two, then loop looking for button presses and then timeout when no buttons are pressed.

So the Raspberry Pi and the temperature sensors can detect when the Freezer or Fridge unit are out of range (too hot or too cold) and the LCD display can show the current temperature and even change colors when the temp is out of range? But how do we notify someone who can hopefully correct the situation? Well we don't have to worry about the issue of a power outage, as there is already an alarm in place for that, we also can assume that we have Wifi access. In a previous project I sent a twitter message to send a warning Create an Internet Connected Pill Dispenser but Channel One wanted to have a text message sent to one or more folks. While Twitter was free, I couldn't find a free SMS solution, but Twilio seemed like a reasonable cost for this project, each text costing only a penny or so. (Still would like to find a free solution)

Assembling the Adafruit LCD 16x2 Plate


Testing on the home Fridge and Freezer


Issues I found this time around

  • The mini keyboard is once again annoying, sometimes types multiple characters and I found it does not have a "\" ...a key that is necessary with  python
  • Running out of time to review/blog about all the things in my Ultimate pi Bundle, still to come: Gertboard, PiFace Digital, Camera, Protoboard, and Embedded Pi

This blog is the first installment of a review of the Ultimate Raspberry Pi Bundle provided by element14. In this review I will focus mainly on the video application I proposed that prompted element14 to so generously provide the comprehensive bundle. This first picture just shows how comprehensive the bundle is.


The Requirement

I play about 72 softball games every year (5 different leagues) and I take pictures of the action when I'm not on the field. These pictures get shown at banquets and sometimes on web sites. I try to take pictures of every player so nobody is left out when the slide shows are presented, but I cannot take pictures while I am batting or playing on the field, so I cannot take pictures of every play or every player.


The Solution Concept

This project involves building an automated video camera that can capture every player as they bat and the play at first base after a hit. To do this, the camera will be located over the fence half way between home plate and first base. The camera will be normally pointing at the batter's box and when the system detects a hit (by the sound of the bat hitting the ball) it will wait a short time for the batter to start running and then pan the camera to capture the play at first base. After 20 or 30 seconds the camera will return to capturing the action at home plate.


Primary Issues

Operating a servo motor and capturing video from the PiCam are nothing new for the Raspberry Pi and I don't expect too many issues getting these functions working. Mainly it will require learning how to use the existing resources available for Raspberry Pi. There are 2 significant challenges though:

  1. Unambiguously recognizing the sound of a bat hitting a ball and wirelessly sending a trigger signal to the camera module will require careful design and lots of experimentation because there are many different types of bat and a significant variety of hit sounds and of course there are many different sounds that need to be ignored as well.
  2. The camera system will need to be in a position where it could be hit by the ball so the system needs to be able to survive a massive impact. Protecting the electronics is plenty hard enough, but protecting the panning drive train may be even tougher. This is a difficult challenge, given that I do not have a large budget and I do not want to lug around a huge apparatus. The enclosure will not only need to protect from very high g accelerations, it will also need to prevent the electronics from getting wet when it rains. Solving these requirements may cause issues with heat build up as it will be hard to conduct heat away from the highly protected interior.


Given that the timeframe for publishing this review ends before the summer softball season starts, I will not be able to test the audio detection circuitry under all conditions, but I will try to get some representative sound triggers.


Design and Hardware Considerations

The system needs to be battery operated so I have procured a 5 volt, 3.2 AHr lithium battery. The Raspberry Pi really needs a display to show video, so I procured a 3.5 inch composite video LCD with a resolution of 640 x 480 for about $18. This display requires 9-15 volts to work, so I procured a DC-DC converter module to boost the battery voltage.

To provide the panning function I procured a high torque servo motor.


Progress and Status

By following the extensive on-line examples and literature, I have:

  • Installed and updated the Rasbian operating system
  • Tested the wireless keyboard/touchpad that came with the XBMC package with the RPi and a TV-android box - it worked great with both systems
  • Installed the Wi-Pi wireless module - it took a couple of attempts because I didn't remember that my wireless router uses WPA2 and PSK.
  • Installed the PiCam and took both stills and video - it is a pretty good little camera
  • Configured the composite output to work well with the 3.5 inch LCD. At 640 x 480 the text is just legible but I set it up for 440 x 300 to make it easier to read.
  • Assembled the 16x2 LCD Pi Plate Kit - I may not end up using this module on this project, but wanted to see if there were any issues with it. If I do use it, it will need to be mechanically robust, so I wanted to solder the LCD connector and mount the LCD on standoffs. The standoffs were not supplied, but I had some 3/16 inch standoffs that worked well. I used nylon washers on the underside of the Pi Plate for better insulation against the screw heads shorting traces that are underneath the screw heads. I tightened the standoffs with the connector loosely in place and soldered the connector after the LCD was locked in position to minimize stress on the connector solder joints.


This second picture shows the Pi Plate LCD assembled and mounted on the Raspberry Pi. It also shows the Wi-Pi module and the PiCam (in an anti-static dust-cover). Raspbian is running and displaying on the small monitor I purchased as a mobile display. The photo is not edited other than resizing, so you can see the small monitor has pretty good colours and at the chosen resolution is very readable. In the SoftballCam this monitor will be a video display (large by videocam standards) as well as an operating system display.


Issues Encountered

  • I tried several different power supplies before I found one that would run the RPi plus peripherals plugged into the RPi USB ports. They all seem to run the CPU card okay, but wouldn't supply enough consistent power to run a mouse. I think it is an issue with instantaneous current - the average current drawn by the RPi is not large, but there seem to be peaks that can momentarily cause some power supplies to sag, particularly if the USB cable has significant impedance.
  • The display I bought was intended for vehicles and it only turns on when a valid composite signal is present. This is not a problem now that I know about it, but initially it didn't seem to be working, because the RPi wasn't generating composite video before the operating system was properly installed.


Next Steps

I am still waiting for the microphone I ordered to arrive and the associated wireless link.

I am designing the microphone signal processing circuit.

I have some of the packaging and mechanical configuration figured out, but still struggling to keep costs down.

I want to try making the servo program - it can be a completely separate task from the video capture.



So far, the Raspberry Pi eco system is proving to be a bit more complicated than I had expected and often the documentation is not robust enough to avoid a lot of auxiliary web researching and trial and error. However there is a lot of information available on the net and it is satisfying to continue up the learning curve towards a successful project.


In this post I will describe my initial tests to use the PiFace to control XBMC. This post is part of a series which is indexed on its introductory post.


Installing and configuring needed software

I initially started with a vanilla RaspBMC to get my project started, but soon it turned out that installing the dependency needed to get all software together broke the base functionality. So instead of diving into the reasons why XBMC no longer wanted to run on my adapted RaspBMC, I restarted with a vanilla Raspbian and installed all needed components on top.


Installing and configuring XBMC

I installed XBMC following this very nice blogpost: XBMC for Raspberry Pi | Michael Gorven. In order to be able to use the remote interface, you will need to change some settings on your XBMC. In the System section, select Settings and look for Services. Here you should find the section Webserver. Enable the webserver, provide a username and password and select a port number. You can go with the default parameters. r change them if you want to increase your level of security.


Screen Shot 2014-02-18 at 20.48.55.pngScreen Shot 2014-02-18 at 20.52.54.pngScreen Shot 2014-02-18 at 20.49.10.png

We now have a webservice available on our  XBMC to control it. This can easily tested from command line with following commands:


pi@rpi ~ $ wget  -q --header='Content-Type: application/json' --post-data='{ "jsonrpc": "2.0", "method": "INPUT.right" , "id": 1 }' http://xbmc:xbmc@

This should move the 'cursor' in XBMC one position right. As you can see, you just need to send the right JSON encoded commands to the webservice in order to control XBMC. Besides controlling XBMC, you can also fetch date from it like the item currently playing, the content of your database, basically all info needed to create a full blown remote interface. I'll probably add some more of this stuff when visualising feedback from the system.  The complete XBMC API is well documented.


Installing the PiFace and its libraries


The PiFace is an add-on board for the Raspberry Pi offering some easy to control inputs and outputs, some onboard buttons and LEDs and two relays. In the pictures below, you see the my Pi with the PiFace on top. In case you're wondering, the nice little wireless keyboard comes with the XBMC bundle.

photo 1.JPG

photo 2.JPG

In order to control the PiFace, some additional software needs to be installed and the SPI kernel module needs to be activated. This is all well documented on the PiFace Digital Install Guide. These steps worked out pretty well for me.




Using Python (my first python script, so don't be to hard on me ;-) ), it was fairly easy to create a script which catches the key which was pressed on the Piface (for now I just used the buttons on the shield it self) and send a command based on which key was pressed to XBMC.


I uploaded the code to GitHub so feel free to fork, extend and improve!


I copied the code below as well and it basically consists of two parts: a class 'face' which captures the key presses and a class 'remote' which sends the JSON commands.



Running the command without parameters will show following usage message:


$ ./
usage: [-h] [--debug] host port username password error: too few arguments


Following parameters can be specified at the command line:


  • host: the hostname or IP address where your XBMC is running
  • port: portnumber where the XBMC RPC API is reachable
  • username: username configured to have access to the remote API
  • password: password configured for above user


Optionally you can add the --debug flag which will show you some basic output when a key is pressed.


And finally, following video shows how it works:


Next up ...


Now that this basic setup is running, I will try to extend the setup by connecting external buttons. At least the 'enter' functionality is missing today to make this any useful ;-)

Project overview

I would like to create a multimedia system which my (young) kids can control themselves. XBMC on the RPi is a great system and has lots of easy ways to control, but although fiddling around with a keyboard or with remote controls on smartphones can be extreme fun for the kids, it is in general not really fit for our little ones to really get a movie selected or the sound adjusted. Especially in the weekend, mom and dad occasionally can enjoy an additional hour of sleep, so it would be great they can choose their own movie or show.


Besides controlling XBMC, we can go a step further and we could also control our DIY domotica system, dimming lights or powering the TV itself. In order to comfort mom and dad even more, a camera could provide a monitoring system.


You can follow my progress in separate blog posts:

  1. A child friendly multimedia center  - Part 2: PiFace controlled XBMC


Project steps

Multimedia center

XBMC will be at the heart of our media center. Using RaspBMC this should be straightforward to set up. With the XBMC bundle, we connect our RPi  with the HDMI cable to the TV. XBMC provides a JSON-RPC interface which we can use to build our own interface.


Interactive control board

In order to create an interactive control board, I plan to use a PiFace Digital. This addon shield should provide an easy way to add my own buttons which can than be mapped to XBMC functions. The state of the buttons will be read by a service on the RPi which will send the appropriate calls to the XMBC over the JSON-RPC interface.

To make it even more fun for the kids, I would like to add some light effects to the board. Using a LED matrix some response can be generated to clearly indicate e.g., the allowed sound levels.

Remote monitoring


By now, we should have a working media center which can be controlled by the kids to select their favourite movie while mom and dad can stay in bed for another hour. But, as worried parents you cannot directly catch your sleep again as it seems awfully quiet downstairs now. Are they just so focused on their favourite show or did they find something they are not supposed to play with? Can you ignore this doubt? Do you get out of bed to check and possibly disturb your angels while they watch their show or do you just grab your smartphone and check the camera on the PI to see what they are doing?

In this second part of the project, I would hook up the PI camera to RPI and make a web service so I would be able to remotely check the living room. Using the WiPi I can connect the RPi to our wireless network.


Home automation


In our home, we have most of the lights in our living room controlled by a wireless system. We don’t want our kids to stay in the dark all time, so I see two options for our kids to control the lights. Both options would use the RPI extension board I already made to create a webservice which can control the lights. It is an arduino like scheme on a Humble Pi connected to the RPi. With this board I can sent signals to the lights from the RPI. First option would be to just extend the card board control with some buttons to control the light. This should be straightforward with what we created before. Second option would be to have some (wireless) light sensors  verify if it is dark in the room when the entertainment system is used. If so, lights are automatically turned on. The RPi extension I made also contains a receiver for TinyTX like sensors, so I should be able to hook up those to read out the ambient light in the room. As we are now using both my own extension and the prototyping board needed for the cardboard control set, the PiRack might come in handy.  It seems it should be able to connect multiple extension boards to the RPi.


Finishing touch


The kids are not the only ones which would like to use the RPi media center! As a final touch, I would like to add a PiFace Control and Display to the stack to have some basic direct controls to the RPi. As the RPi could be used to collect data from the sensors (including temperature sensors), the display could show the latest received temperature readings. Using the buttons, I could change the function of the RPi from media center to Internet Radio and at the same time change channels.



For the past 12 months or so after reading about the exploits of Dave Akerman and his first launching of a Raspberry Pi into near space I've been tinkering with the idea of launching a  balloon myself.  Although there isn't a huge HAB community in NZ there have been some previous launches, and there is plenty of good information and useful tools available via the UK HAS web site, and #highaltitude IRC channel.  The IRC channel in particular has been a great source of information with many friendly people willing to share their experience and knowledge. It's also been very interesting tracking and watching launches live. Even from the other side of the globe it's sometimes possible to watch live video streams of flight preparations at the launch site and from the chase cars as they track balloons across the country-side.  When video isn't available it's still possible to track progress via the live updates on the tracking site and running commentary on #highaltitude.


Slowly different aspects of the project have been coming together.  Most recently I reached my first major milestone, successfully transmitting and decoding telemetry.  I've decided to blog about my exprience with this so far as it may be useful or interesting to others wanting to do something similar.


System Overview


Starting from the payload end and working through to the receiving and decoding end my setup looks like this:

SystemOverview.pngFigure 1 - System Overview.


I'm planning on using a Raspberry Pi Model A for the payload although for development I'm using a Model B as I have a couple of these already on hand purchased from Element 14.  As my day job is J2EE development, Java was my preferred choice of language for the payload control software. The Radiometrix NTX2 seemed to be one of the more popular radio transmitters used in Europe and was readily available also from Element 14 (please note it has subsequently been superceded by the NTX2B). The NTX2 also fitted onto an early circuit board designed to interface both a uBLOX GPS receiver and radio transmitter to the PI's UART, kindly supplied by Dave Akerman.  Dave generously supplied this board as he has since changed his approach and currently uses the i2c interface to talk to the GPS receiver and the Pi's UART to talk to the transmitter.


On the receiving end, at the moment I'm using a cheap RTL2832/R820T based USB tuner brought off ebay from a Hong Kong based supplier.  A FunCube is another option or a dedicated HAM radio or portable scanner, the UK HAS site has recommendations on brands and models. HAB supplies also sell a range of filtered pre-amps that can provide additional gain and sensitivity.  I'm using gqrx, a QT based graphical front end to gnu radio on the iMac for interfacing to the USB tuner - more on this later.  Jack provides a way to directly connect the audio output from gqrx to the audio input dl-fldigi, this avoids having to use any cables or indirect sample from the external speakers to the mic.  It significantly reduces the amount of noise introduced to the signal.  Finally I'm using version 3.1 of dl-fldigi available from the UK HAS web site.



Why RXTX instead of WiringPi?


The typical approach for broadcasting telemetry with a Raspberry Pi and NTX2 is to use the built in UART serial interface to generate the signals.  This is because the OS on the Pi makes bit banging a a serial interface very difficult as it's not a realtime OS and timing is critical so it becomes a significant challenge.  The UART approach utilises the built in hardware to do do all the hard work.  Initially I started working with the WiringPi library and Java front end for doing the serial coms.  I eventually changed to use RXTX, the main driver for this decision was that RXTX provided control over the serial port flags such as the number of bits, parity, and stop bits whereas the WiringPi Java front end didn't provide an API for this.  As it turned out installing RXTX was reasonable straight forward.  There are several useful resources on-line that show you how to do it.  One thing that did take a little bit of tracking down was that by default RXTX didn't recognise /dev/ttyAMA0 as a serial device but that is easily fixed by setting the property before getting the port identifier:


String SerialPortID = "/dev/ttyAMA0";
System.setProperty("", SerialPortID);
CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(SerialPortID);





Raspberry Pi to NTX2 Wiring


The following circuit diagram shows how the NTX2 was wired to the Raspberry Pi.  This is essentially the same as the schematic on the UK HAS page for linking the NTX2 to an Arduino, the only difference is the value of R1 which has been changed from 47K to 22K as VCC for the Pi is 3.3V instead of 5v for the Arduino.  The value of R! influences the carrier shift in Hz when transmitting.  A detailed explanation of how to calculate this is provided on the UK HAS site. They also have some good photos of how to assemble the circuit on a breadboard.

nt2x-schematic.pngFigure 2 - Wiring the NTX2.


Why GQRX instead of SDR#?


Initially I was using my oldish Sony Vaio laptop running Debian Linux as the receiver running SDR# and dl-fldigi.  I suspect the laptop was a bit under powered to run buth these applications at the same time, also it was getting quite hot and so the CPU was stepping the clock speed back to reduce heat output.  I've since given the laptop a good blast with the vacuum cleaner and dropped the average running temperature by about 25-30 degrees.  At some point I may dis-assemble it and give it a proper clean out and replace the thermal paste on the CPU.  In the meantime I had switched to using an iMac for the receiver, this is a quad core I7 with 16GB of RAM so it's more than up to the task.  The only problem is that SDR# isn't available for the OSX so this prompted a switch to GQRX, the QT based front end to Gnu Radio.  As it turns out, I find the GQRX interface much cleaner and simpler than SDR# under Linux.  SDR# seemed to have issues with font sizes and the layout of the left hand control panel always seemed to have far too much white space.  When I re-visit receiving on the laptop I'll try switching to GQRX and see if that runs better the SDR# in a mono runtime.


Audio Patching


I've used Jack Audio to directly patch the audio output from GQRX to DL-FLDIGI. This eliminates any background noise and makes for a much cleaner signal being passed into dl-fldigi.


You need to start up both gqrx and dl-fldigi and then use the jack configuration tool to wire the out from gqrx to the input for dl-fldigi.


jack-pilot-config.pngFigure 3 - Jack Configuration


Reciever Screenshots


The first two screen shots show the gqrx and dl-fldigi interfaces while the transmitter is on but not transmitting data.  In this case you can see a spike on the FFT plot in gqrx where the carrier signal is. If the transmitter is disconnected or the enable pin low then you won't see a spike on the FFT plot or waterfall below.


Figure 4 - gqrx screen when transmitter is on but not transmitting data.

(Note: We're zoomed in quite a bit here, on the Mac you can zoom using the mouse wheel while hovering over the frequency or db labels)


Figure 5 - dl-fldigi screen when transmitter is on but not transmitting data.



Figure 6 - gqrx screen when transmitter is transmitting data.


Figure 7 - d-fldigi screen when transmitter is transmitting data.



Figure 8 - dl-fldigi RTTY settings.


The settings in Figure 8 need to match the serial port parameters set in your code, i.e. buad rate, bits per character, parity, and stop bits.  The value of the custom shift is dependent on the value of the resistor R1, in the example above I have the value slightly lower than what the calculated value should be (~636Hz). The receiver filter bandwidth controls how wide the range for the signals can be, this is displayed graphically in the waterfall the two thick horizontal red lines.




This post was written to share my experience with getting the Raspberry Pi to transmit RTTY data via a NTX2 radio transmitter.  I'm by no means an expert in this, in fact I'm learning most of it as I go, but I thought others trying to do the same may benefit from some of experimentation.  If you spot anything glaringly wrong please let me know so I can make corrections.  I'm still refining things, experimenting with a more accurate carrier shift, and tweaking the signal gain in particular.  Following that will be some range testing to see how far this rig is going to work, and how different aerial configurations are going to impact range.  If you have any questions please feel free to add comments and I'll endeavour to answer them.




Thanks to element14 and the Pi NoIR and Catch Santa Challenge, my daughter and I won a Rapiro kit with Raspberry Pi and Pi Camera.


In this post, I will describe my experiences in building and getting Rapiro up and running.




The kit came in a large white box, accompanied by a Raspberry Pi and Pi Camera.



The Rapiro kit comes in a big box which can be used later on to carry the assembled Rapiro.


photo 4.JPG

All parts are neatly arranged in individual compartments.


Unfortunately, no instructions are provided with the kit.


After some searches on Rapiro's Kickstarter page and website, I was able to gather different pieces of information:


Since Kickstarter rewards only started shipping about two to three week ago, there is not a lot of user feedback yet. Also, as I'm not a backer on Kickstarter, I am unable to post comments in order to ask questions etc ...


I've read that a discussion forum will be open soon, but until then, I'm on my own.






Using the photo gallery, assembling Rapiro was easy. The photo instructions are very clear and make it very easy to compare with.


IMG_3291 copy.JPGphoto 9.JPG

Labeling the servos and connecting them to the control board to set the initial position of the servo.


photo 10.JPGphoto 12.JPG

Passing the servo cables through the foreseen slots to the control board.


IMG_3306 copy.JPG photo 16.JPG

Connecting the RGB LEDs and attaching the final piece of the kit.


The build took approximately 2 hours and did not require any soldering, only a screwdriver and some common sense.


Raspberry Pi


It's possible to expand Rapiro's capabilities by adding different components, such as:

  • Raspberry Pi and Pi Camera
  • Speakers
  • PSD distance sensor


These components do not come with the Rapiro Kit by default and Rapiro is able to function without them.


I installed the Raspberry Pi and Pi Camera as those were kindly provided by element14.


It's important to prepare your SD card in advance, as once the head is closed, there is no access to the SD card slot or HDMI port.

I installed the latest Raspbian, enabled camera support, wifi and ssh, in order to be able to control Rapiro remotely.



photo 15.JPG photo 19.JPG

Pi and camera are installed in Rapiro's head. Pi is connected and powered via GPIO pins.


photo 21.JPG

Wi-Pi connected in the back of Rapiro's head.


Arduino Sketch

The Arduino sketch for Rapiro can be modified and uploaded using the Arduino IDE and the micro USB connection.

It's very useful to update the sketch to:

  • modify the initial position of the servos to properly align feet, arms, etc ... in case they weren't during installation
  • program new moves
  • ...

In my case for example, both feet weren't exactly sitting flat on the table and the waist was not propery aligned. So instead of taking everything apart to correct this, I modified the starting position of the feet's and waist's servos and uploaded the updated sketch.

// Fine angle adjustments (degrees)
int trim[MAXSN] = { 0,  // Head yaw
                    -5,  // Waist yaw
                    0,  // R Sholder roll
                    0,  // R Sholder pitch
                    0,  // R Hand grip
                    0,  // L Sholder roll
                    0,  // L Sholder pitch
                    0,  // L Hand grip
                    0,  // R Foot yaw
                    10,  // R Foot pitch
                    0,  // L Foot yaw
                    5}; // L Foot pitch

Commands via Pi

The Arduino sketch comes with some predefined movement sequences and positions. They can be called via the serial interface of the Pi.

I installed minicom:

pi@rapiro ~ $ sudo apt-get install minicom


I couldn't find an actual list of sequences documented anywhere, so I derived some from the Arduino code.

To execute them, you pass the sequence's number via the serial interface:

pi@rapiro ~ $ echo "#M6" | sudo minicom -b 57600 -o -D /dev/ttyAMA0

Here's a little demo:

Thank you

Our cats do not necessarily like our new robot friend, but we love him!


Thank you again for this awesome prize, and stay tuned for more adventures with Rapiro.



Valentine's Pi - Finale

Posted by zengirl2 Top Member Feb 14, 2014



Happy Valentine's Day, everyone!  Here is my project looking all glam with the white paint, wire mesh and red LED.  It's actually pretty much how I imagined it, plus or minus some Python coding challenges .  It's successfully taking a Twitter feed of @LoveQuotes and sending it to the Epaper display.  There is just one more challenge -- check out my video.



Obviously you will get another update on this before I move on to my next project.  However, I want to mention some of the things I learned with this Raspberry Pi project.  First, it's amazing how small computers have become.  To see the progress on chips and materials -- it's just amazing.  With that said, going lean and working with the command line was quite a challenge, but after a few days, I relied on a cheat sheet less and less.  Also, troubleshooting code gave me such a knowledge of the directories!  I think I could probably win a trivia contest on Epaper's /gratis/PlatformWithOS/demo.   I don't even think I could call myself a beginner of Python -- I'm just getting my feet wet.  None the less, I was able to be helpful in troubleshooting issues with two tutorials and helped to correct them.  I also tracked down a little magic for correcting the keyboard setting from Great Britain to US.  I should probably add a link for that!  There's nothing like having your # in a place where you can't find it when you are working with Twitter .  Most of all, I'm in awe of the thinking that went into this computer, to make it something that people of all ages would have an interest in, and find educational.  I still find myself getting ideas for other uses.  Really, any information gathering on the internet can be transformed into art or a practical device.  So, if you are wondering if this is for you or your child, take it from this English major -- it's cool.  Thanks for following my work and I hope to get the final answers on my code soon.  Peace, love and engineering!

You can find part 1 here: Pi Alarm System - Part 1: Project and components description

Wireless Sensors

This post is focusing on the wireless sensors spread around the house in order to detect possible intrusion. In a later post, I will collect the data from these sensors with the Raspberry Pi.

RF Modules

For the communication between the remote wireless sensors and the central control unit, I used RF433MHz transmitters and a receiver.

The sensors will be equipped with a transmitter each, and the control unit with a receiver.

photo (1).JPG

RF433MHz transmitter (left) and receiver (right)

The remote sensors need to be small, so I opted for the ATtiny85 which can easily be programmed with the Arduino IDE after installing the necessary files to recognise the hardware.

I downloaded the "arduino-tiny" ATtiny cores from, unzipped the contents in the Arduino/hardware folder and after restarting the Arduino IDE, the ATtiny "boards" could be selected for programming:

Screen Shot 2014-02-10 at 21.08.14.png

ATtiny cores available in Arduino IDE

Prototype test

I performed a quick test by hooking up an ATtiny85 to a transmitter and an Arduino Uno to a receiver. Wrote small sketches for basic one-way communication for both Tx and Rx units.


ATtiny85 transmitter (top) and Arduino Uno receiver (bottom)

The transmitter code sends an integer representing the sensor's id. The receiver code waits for data and displays it on the serial interface when available.

The goal is to have every sensor send their unique id to the receiver once they are triggered. This would be done periodically, let's say every 5 seconds.

Transmitter (ATtiny85) code:

Receiver (Arduino Uno) code:


As mentioned in part 1, there will be two types of triggers for the remote sensors: switch or motion sensor.


The switch type of sensor can be used for doors and windows. In idle state, the switch interrupts the circuit, powering everything off.

Once the door/window is opened, the switch powers the circuit resulting in the ATtiny85 sending its sensor ID to the control unit.

photo 2.JPG

Circuit is powered when the switch is triggered

Note: the switch's functionality should be reversed (the circuit should be powered when the switch is opened).


For the second type of sensor, the motion detector should always be on. But in order to avoid having to power all components all the time, I power the ATtiny85 and RF433 transmitter using the PIR sensor's output pin. The PIR sensor's output pin goes HIGH when motion is detected. The duration of the pin's state can be changed by using one of the PIR sensor's potentiometers.

Sketch of the circuit, I hope it makes sense ... (feel free to point out any corrections and/or improvements ):

photo 1.JPG

When the PIR detects motion, the ATtiny85 and RF433 transmitter are powered



By adding antennas to receivers and transmitters, I was able to get reliable coverage in the entire house, even through big concrete walls.

Both sensor types work on breadboard and can now be turned into more compact PCBs.


Valentine's Day is almost here, and I'm doing some fast learning about Python in order to combine some programs for my display. I've got the Epaper display doing the Twitter monitor @LoveQuotes feed. Notice that the font was looking pretty small, but I was able to make some changes in size to the program so that it was easier to read. Then I merely watched the stream to see which font size worked best. I decided that it was better to be on the larger size and have more readability for average length quotes, rather than be small to include extra long quotes. After all, it is a short format form of media . Hey, speaking of short format, did I mention that current style is one space after a period in sentences? I'm still doing two spaces, which I'll try to correct from now on! Sheesh, it's hard enough to stay current on all the social media, let alone the English language style changes!




Okay, now I'm on the tricky part. I want to send a tweet to the stream using a special string that will result in a celebration -- like a personal message followed by a series of photographs of me and my husband. So far I've got the special string being identified and printed on the computer monitor, but now I'm on the part where I need the image files to be sent to the Epaper display. It could very well be that I get stuck on this, and I really want it to be done by Valentine's Day. So, if you are already on my contact list for this community, be ready for one of those coding911emails.  I'm off for another late night!

First and foremost, sincere thanks to all those who participated and to those who guided this challenge to its successful conclusion. We've been inspired by the projects that have been created and been delighted to see the possibilities of the Pi NoIR explored so comprehensively.
Given all the wonderful content generated by the challengers, it's been difficult to make a choice.  However, we have selected Frederick Vandenbosch and his young helper as the winners.  Frederick's project was not only well documented and entertaining, it was thoroughly imbued with the true spirit of the holiday season.
RapiroAnd now for the Grand Prize.  While element14 will never take the place of Santa Claus, we believe we have picked the perfect gift so that Frederick and his daughter can continue to explore the world of possibilities that electronics engineering has to offer.  From Japan, we have acquired a Rapiro Robot Kit (pictured right) before it is available to the general public.  We will also soon be offering Rapiro - Programmable DIY Robot Kit. However, the very first will be sent to Frederick as soon as possible.  We hope that this will encourage him to continue his outstanding blogs in our Pi Projects area as he no doubt understands the potential of this exciting product, which was such a big hit at CES 2014.
Once again, many thanks to our competitors and participants.  Stay tuned for many more exciting challenges on element14 in 2014.

Well, that was fun!  I finally got my epaper display working and I'm sending high-five's to Christopher Hall at RePaper for all the help.  Apparently there was a "change directory" needed, and also an adjustment in display size, since I have the larger 2.7 version.  Oh yes, and also a couple of tweaks to some wires, as I misunderstood the numbering of the pins on the epaper display.  If you look carefully, there is a hint about this on the board, and definitely watch the doubles of some of the wire colors!  Here's some other shots of the display as it cycled through the demo's.  (Sorry for the glare, but I'm keeping the protective film on until I'm near project end):




You may recall I had been fighting with the acrylic paint and foam brush for my Valentine's box.  Well, I got some Krylon paint in a glossy white and it's looking a lot better now -- much more like a modern heart. My next step is to get the Twitter tutorial running that works with the epaper display, so I can hack to get my hash tag surprise working.  That should be challenging, as I only have a little exposure to Python.  Will it be done in time for Valentine's Day?  Not sure, but I'm giving it my best shot!



I've been blogging about my experience in Road Test reviewing the Ultimate Raspberry Pi Bundle. As a part of this Road Test I'm creating a Fridge/Freezer Temperature Alarm system for our local food shelf, Channel 1. You can see where this Road Test started for me here


After the success of my first Raspberry Pi Project The Pi Powered Joke Machine - The Ultimate Raspberry Pi Bundle Blog post

I documented that fun little educational project on Instructables (since they are running a Raspberry Pi contest)


And now it's back to the Temperature sensor. I need to figure out what type of temp sensor I should use. Previously I found this resource on Element 14 that lays out the types of temp sensors I could use

Hints for selecting the correct temperature sensor for your application


For a project I worked on a few years back, we used an Arduino and a TMP36 IC and I also had access to an LM34 and LM35, but I believe those would all require analog ports which the Pi doesn't have.

I thought a thermocouple might work, but a friend tells me they put out a very low level signal that requires a lot of analog processing (hmm again analog port required)

He recommended a digital output sensor like the Dallas Semi DS18B20 and found a prepackaged version that looks like what I want. It is pre-wired, waterproof, is meant to go long distances (I'll have to run the sensor out 25ft from where I mount the Pi) and they have included some documentation / examples on how to use it.

Reasonably priced at $9.95 (although I could have saved money and bought just the ICs...but...then I would have to try to wrap them up to stand up to the cold of the freezer and buy cable and cable wrap....) Another good sign is that according to my research Raspian (which I've installed on my Pi) supports this type of temp sensor

Here is a link to the tutorial on how to use the sensor Adafruit's Raspberry Pi Lesson 11. DS18B20 Temperature Sensing


And here is a little bonus too, I happened to notice Adafruit was having a few live events....Demos of Wearable tech, a Show and Tell session and Ask an Engineer. I participated in the Show and Tell (showing off my Pi Powered Joke Machine) and then while watching the Ask an Engineer session they provided a discount code worth 10% off all orders for the my temp sensors are on the way!


Next step...while waiting for the Temp Sensors I'm going to crack in to some of the other items in the bundle....hmm possibly the Gertboard and or the Pi Camera....say cheese!

I've been blogging about my experience in Road Test reviewing the Ultimate Raspberry Pi Bundle. As a part of this Road Test I'm creating a Fridge/Freezer Temperature Alarm system for our local food shelf, Channel 1. You can see where this Road Test started for me here


Here is a short video of a project I created as a way of learning the Raspberry Pi. The Joke Machine queries and displays a One-Liner in 16 char segments. It uses the momentary buttons found on the PiFace Control and Display to allow you to scroll forward and backward the joke and request a new joke.


To create the Joke Machine I had to do the following:

I found a website that provides free Quotes (including One-Liners which is what I used here). The quotes come back in basic text and so I figured a simply wget or curl example would work....I ended up using pycurl and not using python3. Seemed like I was having problems getting the pifacecad examples to both be using the same version fo Python. In fact many examples of using the buttons on the PiFaceCad required python3...which is fine, but I was running into problems getting pycurl to run in python3. So I ended up using the following style of handling multiple buttons on the PiFace

Install the PiFace Control And Display Example code

sudo apt-get install python{,3}-pifacecad


Install PyCurl

sudo aptitude install python-pycurl



This is the python script I created to query to get the one-liner, break it into 16 char segments and handle the buttons to allow users to scroll.
I posted the code for TheQuoteMachine.Py as an attachment in my previous blog post
PiFace Control & Display - The Ultimate Raspberry Pi Bundle

Don't forget to make it executable by running chmod +x /home/pi/bin/


Push a Button, Get a Joke

Now you can run /home/pi/  It will connect to the free service and display hilarious one-liners. It does this by getting the one-liner back in straight text, splitting it up into 16-Char wide segments and then allowing you to scroll up and down through those segments using the PiFace buttons.


The Quote Machine Buttons:

  • Button 1 is the back button
  • Button 2 is the advance display button
  • Button 3 is the New Quote button
  • Button 4 is the Quit Button

I know you've been wondering what I've been up to.  Despite all the snow, the delivery truck managed to get my sweet display here for my project.  Can you guess what it is?

Epaper M.JPGEpaper Pi M.JPG

I'm not telling!  Anyway, she is a beauty and I'm very excited to get her showing love quotes.  As you can see, there are quite a few pins that need to be connected.  In fact, I had to print out a pin chart and also get my magnifying glass out to be sure I had things hooked up properly.  I noticed the screen was white when I received it, and now it has bars.  I'm hoping that is a positive sign; my video background says test bars are a good thing.    So, on to the complications of where I am today.  This past week I've been muddling through a tutorial I found for connecting this display to Pi.  I was doing quite well and got all sorts of libraries installed.  However, I came to a grinding halt with an error message.  After trying the entire process again, I realized that I had not made a mistake.  There was something wrong with the commands.  I did some sleuthing at GitHub and found the guy that posted the original info.  Luckily his email was posted, and he swiftly responded to my query.  He said that some lines of commands were missing, which he kindly filled in for me.  So, I made it through a couple more lines with his help, only to get caught again.  We've had about 3 rounds now, but I'm really close to having a working display.  Apparently Chinese New Year had caused him a delay, but today is the day I get to really see if I make it though the entire tutorial.  So, keep your fingers crossed and I promise to have a video when it works.  Otherwise, you will get the Leslie pouting video.   Actually you all know me too well, and I don't give up.  I'm going to make it easier for the next person to do this. 

I've been blogging about my experiences in Road Test reviewing the Ultimate Raspberry Pi Bundle. As a part of this Road Test I'm creating a Fridge/Freezer Temperature Alarm system for our local food shelf. You can see where this Road Test started for me here


My next step is to add an LCD display connection

I have two choices with the The Ultimate Raspberry Pi Bundle


I'm going to start with the PiFace Control & Display because it doesn't need to be soldered together and it features an interesting Remote Control interface. I'm glad that both items include the option of control buttons (should be handy for adjusting the temperature sensor and for use as a "snooze alarm" button for my Temperature Alarm System.


The PiFace™ Control & Display is a plug and play device that allows you to use and control your Raspberry Pi without a keyboard, mouse and monitor. It saves space and power yet still provides a simple and functional user interface.


Getting Started

A perfect place to get started is with the PiFace Quick Start Guide  and it's setup instructions

This document walked me through the simple process of

  • aligning the CAD shield and connecting it to the Pi
  • Enable the SPI bu by running: sudo raspi-config, option 5
  • the installation of Control and Display software by running
    sudo apt-get install python3-pifacecad
  • Testing the device with the handy command
    python3 /usr/share/doc/python3-pifacecad/examples/
    Note: the example command shows the IP address and temperature of the Raspberry Pi. Having the IP address is handy for times when I want to use SSH to start vncserver and then vncviewer to connect to the system




I put the Pi away and when I came back to try it again the next day. To my surprise, made the screen flicker but display nothing. The troubleshooting section in Quick Start Guide mentioned :

If your LCD has nothing appearing on it or its character spaces are all

black, try adjusting the contrast screw with a small star head screwdriver.

But it doesn't exactly say where that is...look for the screwdriver in the lower right hand corner of the picture...that's where the adjustment screw is:




One question I have is with the CAD in place, how can I easily access the other ports available, ...looks like they are available on top??


Wake Up with Sysinfo!

As I mentioned in my last post I like connecting to my Pi using vnc and in the interest of learning something new, I decided to have the sysinfo program run at startup for my Pi. This way no matter where I plug will display the IP address it has been assigned and then I can easily SSH to it (and optionally run vncserver)

In order to make run at startup, I had to:

  • Copy the program to and modify it so that it no longer loops forever.
  • register the program so it runs at startup


To modify script so it no longer loops forever, you simply need to:

  • comment out line 48, the while True statement in the show_sysinfo() routine.
  • comment out line 57, the while Sleep statement in the show_sysinfo() routine.
  • change the indentation on the show sysinfo() routine

To Run the at startup, you simply need to:

  • create a file in /etc/init.d that calls the new script (I've called it SysInfostart and attached it to this blog post)
  • chmod +x /etc/init.d/SysInfostart
  • test running the script so it won't hang or error out at reboot
  • register the command to run at startup by running the command:
    sudo update-rc.d SysInfostart defaults
  • Should you want to stop having this program run at startup run the following command:
    sudo update-rc.d -f SysInfostart remove


Now reboot the Raspberry Pi and you'll see "Waiting for IP...." and then the IP Address of your Pi will appear


To use VNC to connect to the Pi you simply need to:

  • run ssh or putty from your windows machine to the ip address. An easy way to do this is to install Winscp and use it


Once you log on to the Pi with WinScp, click on the ,Open Terminal icon and you can run commands on the this case we want to run the vncserver command


And finally you'll be able to connect using vncviewer.

Vncviewer gives you a full gui environment running on the Pi




Next steps for me on the Ultimate Raspberry Pi Bundle review........create something useful with the  PiFace Control &'s called the Automatic One-Liner Machine


Also ...things to look into...I found if I want to try to debug the problem with my XBMC SD card, I should take a look at this page R-Pi Troubleshooting -

Filter Blog

By date: By tag: