Note: First blog post can be found here.
Having an image pre-built to support the sensor board is handy, but most people will want to add support into their already existing Raspberry Pi environment instead. Thankfully this turned out to be very straight forward. Note that you will need to connect an Ethernet cable to the Raspberry Pi to access the Internet.
I started out with NOOBS 1.3.4 (which is the latest as of this post) to install Raspbian on an SD card. Unfortunately there’s some sort of bug with this version since trying to install Raspbian gave me an error that said I was out of space on my 4GB SD card. However after some Googling, I found out I could erase the other distros I wouldn’t be using, and then it would work. The key part was to erase the other distros before ever inserting the SD card into the Pi.
Installation of Raspbian using the Quick Start Guide took a while as it extracted the filesystem and set itself up. But eventually I was able to see the desktop in its full glory
Now it was time to add support for the sensor board. The main task is to enable the I2C drivers for the Raspberry Pi. You can either do this by modifying the blacklist modprobe file (which enables I2C permanently) or by doing a modprobe which only enables it until you reboot your Pi. I opted for the former.
First I opened up LXTerminal from the desktop, and opened the blacklist file with “nano”.
sudo nano /etc/modprobe.d/raspi-blacklist.conf
You could use any text editor to do this, but nano is just convenient. The “sudo” part is to temporarily raise your permissions so you can edit the file.
Then put a hash sign (#) in front of “blacklist i2c-bcm2708”. This tells Linux to ignore that line, and it will not block the I2C driver from loading. Hit Ctrl+O to save the file (hit Enter at the prompt that comes up to save it to the same name) and then Ctrl+X to exit the editor.
Then in the home directory (use "cd ~" to get there), the example code can be downloaded via git.
git clone http://git.oschina.net/embest/rpi_sensor_board.git
Finally do a reboot so the changes can take affect:
sudo reboot
Once it comes back up, you can run the various sensor python scripts like in the 1st blog post.
There are also further instructions in the user guide for setting up the webpages. I won’t go over those, just make sure you only uncomment (erase the # sign) the specific lines listed.
Next I’ll try to get this sensor board working with a FRDM-KL26. There is already code and instructions for using it with a FRDM-KL25, so my goal is to show how this board can work with any Freescale Freedom board.