Sunday, April 20, 2014

Raspberry Pi and Arduino

In spite of a severe cold - or probably because of it I decided that I would play with my pi.

The goal is to get the weather information from my Weather Station inside and send it out to the internet of things someplace.  I have had it running in the past - but it invloved me leaving the desktop running and eating way too much power.

I have seen a lot of elaborate lashups using spi and whatnot hooked into the pi and the nrf24l01 - but I figured that I would do it different.  Let the Pi do what id does best and the Arduino do what it does best.
The pie is a Unix computer and will do the heavy lifting since it has internet connectivity built in and lots of ways to display the data or send it out to one of the IOT cloud servers.

The Arduino because of its robust pin protection and scads of code to talk to the nrf24l01.
Goals
1) Run the Pi from a hard drive.  I have seen lots of posts of sd card failures after a while.  They have a limited R/W Life.  Plus I have a bunch of old hard drives.

2) Plug the Arduino into the Pi and run the Arduino IDE there.  This keeps me from having to run all over the house and finding various things to get a sd card reader set up and into one of my computers.  It is so much better to keep it all in once place.

The key to all this is a Powered USB hub - it has everything plugged into it and powers the whole show.  I found one at newegg that has 7 ports and an on off switch. Keyboard and mouse go in the end - everything else goes in the top - to reboot a locked pi without dealing without unplugging a USB - there is that switch - very convenient.  The PC has a hundred watt power supply and uses a lot of power spinning up 3.5 terabytes of hard drive storage.  The power plug for the hub is 10 watts, very efficient.

I won't bore you with the details - others have already done an excellent job of documenting what to do.


  • Setting up the PI - I used Berryboot since it has an option to install directly on a hard drive. My settings include booting to a desktop and enabling SSH,
  • How to install tightvnc on the PI - http://elinux.org/RPi_VNC_Server
  • Installing the Arduino IDE was as easy as sudo apt-get install arduino
  • Putty  and vncviewer installed on the PC and lets me get the monitor the PI is plugged into back onto the PC.

Sounds easy - and it was - but it took a while - The Pi is not know known for its speed.

Part two will involve actually plugging the hardware together and running some simple scripts (and for me to start up the Python learning curve)