Numpy/Scipy/Matplotlib on Raspberry Pi

Notice:  The method posted here worked great and was faster.  Try this first: http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/robot/downloads/

If that does not work then try this:

Ok, so this is the second time I had to stumble through this. Here the commands I used to finally get it to work. Total compile time was a few hours. The third and forth steps, contributed by Ty Rudder, are for an optional performance boost.

$ sudo apt-get install libblas-dev        ## 1-2 minutes
$ sudo apt-get install liblapack-dev      ## 1-2 minutes
[$ sudo apt-get install python-dev        ## Optional]
[$ sudo apt-get install libatlas-base-dev ## Optional speed up execution]
$ sudo apt-get install gfortran           ## 2-3 minutes
$ sudo apt-get install python-setuptools  ## ?
$ sudo easy_install scipy                 ## 2-3 hours
$ ## previous might also work: python-scipy without all dependencancies
$ sudo apt-get install python-matplotlib  ## 1 hour

… and the result is being able to do some nice processing on this blood pressure data. Below is 200 Hz pressure data, bandpass filtered between .5 and 5 Hz. You can clearly see the arterial pulses.

While I am jotting down hints, here is how to forward your X11 windows as root though ssh.

  1. From remote $ ssh -X pi@192.168.1.3 # change to pi’s IP address
  2. On Raspberry Pi $ sudo cp /home/pi/.Xauthority /root
  3. Now run your graphical program.  Window should display on remote computer.

Install Node (install webide or from source…):

  1. Download tarball from nodejs.org
  2. ./configure
  3. make
  4. make install 

Install simplejson (easy_install simplejson)

Install PIL (sudo apt-get install python-imaging)

Install PySerial (sudo apt-get install python-serial)

when installing power switch without RTC– both scripts rely on /etc/rc.local  if hwclock is not found, then script exits and does not run switch.sh.  FIX: run switch.sh before hwclock

FIX SD CARD: use Ubuntu boot disk creator to format disk, then dd newest distro

CNC AlaMode!

AlaMode is in stock and shipping now from Makershed ,SeeedStudios and ABRA Electronics

I’m a maker, and as a maker, I love tools. As a computer geek, I’ve long been interested in computer controlled tools. When Riley Porter of Synthetos suggested using AlaMode to control a CNC router from a Raspberry Pi, I was thrilled!

Riley and Alden Hart of Synthetos.com have been developing controllers for DIY CNC machines, and they make the controller for the Shapeoko, the lowest cost DIY CNC router around. They sent me the grblShield that is normally shipped with an Arduino in the complete Shapeoko kit.

I ordered the mechanical kit from Inventables.com, and then picked up stepper motors and a power supply from some surplus outlets.

This is of the simplest and most rewarding applications of AlaMode. People often dedicate an old computer to their CNC routers, but being in a dusty environment, it can be hard to keep everything running well. By stacking the credit card sized AlaMode, the Raspberry Pi and the GRBL shield, you get a wonderful networked platform for CNC that can be neatly boxed (though I haven’t gone that far yet!)

After assembling the Shapeoko, and wiring the motors to the grblShield, you’ll need to program GRBL onto AlaMode. Download the GRBL  optimized for GRBLShield, and assuming you’ve set up Raspberry Pi with the AlaMode version of Arduino, you can program it directly from the command line:

[code]avrdude -c alamode -b 115200 -P /dev/ttyS0 -p m328p -U flash:w:grbl-Shapeoko.hex[/code]

In the next post, I’ll talk about sending jobs to the AlaMode Shapeoko, including over the network!

 

Color/Light Sensing Breakout Board

Our friend and fellow open hardware advocate, Jayson Tautic of Tautic.com is offering a cool breakout board on Tindie that word clock makers might want to take a look at.  It is a break out board for the TCS34717 – Color Light-to-Digital Converter.

ClockTHREEjr has a light dependent resistor or LDR board to measure brightness.  The problem with all of the LED switching taking place on the board, the analog measurement gets screwed up.  This breakout board could be the answer.  Besides measuring RGB color intensities, it also give an overall brightness reading which could be use to dim the LEDs when the lights go out.