PiFace Control and Display interface with a Google Coder project

December 26, 2013

I recently came across this contest from the makers of the PiFace Control and Display. The PiFace Control and Display is a stackable hardware board that comes with tactile switches, IR receiver for remote control applications and a small LCD.

I had less than a day to make something using the display. The theme of the contest is to countdown to a target date. I decided to use the Google coder image for the Raspberry Pi. The Google coder is a platform meant for beginners in web development and enables building our own website on a local network. A step-by-step instruction of the Google coder setup is available on the Google Coder page. The instructions are more or less similar to the Raspbian setup for the Raspberry Pi.

Accessing the Google coder platform from a Windows desktop requires the installation of the Bonjour drivers for Windows. The Google coder desktop can be accessed from a browser at the following address is http://coder.local. I downloaded the digital clock application from the Google Coder repository and modified the same to display the countdown timer on the PiFace Control and Display.

Image

I modified the clock such that it is possible to pick a date to count down. I used pickadate.js to pick a date from the calendar. for the countdown selection. The clock pings a web.py framework based webpage with the countdown data which is consequently displayed on the LCD.

Image

Countdown timer interfaced to the Google Coder application

I also wrote a couple of lines to control the LPD8806 LED strip lighting using a TV remote control. Based on the number pressed on the TV remote, the python script reading the PICAD’s IR receiver, sends a control word to the Arduino controlling the LED strip to switch the LED sequence.

Setup Instructions:

The Google Coder and the PiFace Control and Display setup instructions are available over the web. The modifications to the clock application and the python script are available from my github account.


Currency exchange ticker using Raspberry Pi + Pi Lite

July 8, 2013

I recently bought a Pi Lite board from Ciseco PLC, UK. The Pi Lite is an add-on hardware board for the Raspberry Pi. It comes with 126 LEDs and is controlled by an Atmega328p microcontroller (The one used in the Arduino Uno platform). The Pi-Lite uses the BCM chipset’s serial port for its communication to the Raspberry Pi.

Image

Pi Lite + Raspberry Pi inside an enclosure from Nudatech

Since the Pi Lite is a stackable add-on hardware, they have provided access to the Pi’s GPIO pins on the add-on board. It is possible to scroll messages on the Pi-Lite display by sending messages via the serial port on the Raspberry Pi. A simple step-by-step guide to setup the serial port to transmit messages to the Pi-Lite is available here.

I was able to run a simple program that fetches the currency exchange rate from the web and scroll the same on the Pi-Lite Display in two simple steps.

I got started by fetching currency exchange rate data:


import requests
import json

data = requests.get('http://rate-exchange.appspot.com/currency?from=USD&to=INR')
jsondata = json.loads(data.content)
retrieved_data = jsondata['rate']
print(retrieved_data)

We can scroll the retrieved data on the display by simply opening the serial port (The port at which the Pi-Lite is connected) and writing the string to it.


baud = 9600
port = '/dev/ttyAMA0'

ser = serial.Serial(port,baud)
ser.timeout = 0
ser.flushInput()

ser.write(str(retrieved_data))

Combining the above two steps, we have:


import requests
import json
import serial
from time import sleep

baud = 9600
port = '/dev/ttyAMA0'

ser = serial.Serial(port,baud)
ser.timeout = 0
ser.flushInput()

while True:
 data = requests.get('http://rate-exchange.appspot.com/currency?from=USD&to=INR')
 jsondata = json.loads(data.content)
 retrieved_data = jsondata['rate']
 print(retrieved_data)
 ser.write(str(retrieved_data))
 sleep(10)

I was not able to take a good picture due to the brightness of the LEDs. Hence, I am sharing a black and white video of the currency exchange rate being updated every 10 seconds:

Note: I am not promoting the Pi-Lite board!


Make Magazine’s Raspberry Pi meetup

January 17, 2013

MAKE magazine organized a web meetup today. Eben Upton (Founder of Raspberry Pi foundation), hackerspace folks participated in this meetup. If you missed it, here is Google Hangout video


Testing Blinkm with PiCrust

November 15, 2012

I just posted testing Blinkm with PiCrust at D.I.Y with Pi.

Image

Have fun by making something cool!


Raspberry Pi à la mode

November 11, 2012

AlaMode is a stackable arduino clone that empowers a Raspberry Pi with the ability to add arduino shields to it. It is an open source platform and easy to use.

AlaMode comes in a package like the one shown below:

Image

The datasheet for the AlaMode is available here.

It is possible to program the platform via the UART pins of the Raspberry Pi’s GPIO. The Wyolum webpage has provided clear instructions to get started with the hardware.

The board can be driven by the power supply via the Raspberry Pi or a wall wart. The jumper is located here as shown below:

Image

I got the typical arduino LED example working using the AlaMode.

Image

Happy Hacking!


Cubieboard goes for crowd funding

October 25, 2012

The DIY world is abuzz with Raspberry Pi news. I read a new project idea based on the Raspberry Pi every other day.  Though not a competitor to the Pi, there is another product in the market that uses a Cortex A8 processor.

Cubieboard

Photosource: Cubieboard

In my opinion, the Raspberry Pi’s sole purpose is to help students (it is being used by anyone who wants to be “hands-on”) while the Cubieboard is more directed towards DIY enthusiasts.  I do envision an “Arduino like revolution” with the Cubieboard. I wouldn’t be surprised if Cubieboard complements Raspberry Pi in reaching a larger audience. Their website claims the following:

  • 1G ARM cortex-A8 processor, NEON, VFPv3, 256KB L2 cache
  • Mali400, OpenGL ES GPU
  • 1GB DDR3 @480MHz
  • HDMI 1080p Output
  • 10/100M Ethernet
  • 4GB Nand Flash
  • 2 USB Host, 1 micro SD slot, 1 SATA, 1 ir
  • 96 extend pin including I2C, SPI, RGB/LVDS, CSI/TS, FM-IN, ADC, CVBS, VGA, SPDIF-OUT, R-TP..
  • Running Android, Ubuntu and other Linux distributions

This might attract any DIY enthusiast :) They have been selling it via Ali-express and also shipped the first batch to developers. They are currently pitching for crowd funding through Indiegogo. I am also a proud supporter of the Cubieboard. I can’t wait to get my hands on it.


Using PICkit3 with a Windows 7 64 bit machine

September 23, 2012

I was not able to get my PICkit3 working with a Windows 7 64 machine. Though  I tried different suggestions offered at the Microchip forums, the error seemed to be the one shown below:

Image  

I found a possible solution to this issue. I downloaded the PICkit3 GUI and scripting application from here.  

I extracted the PICkit3 application and launched it. Under tools, there was an option called “Download PICkit3 operating system”

Image

There was a file called “PK3OSV020000.hex” in the PICkit3 GUI directory. This hex file updated the firmware on the PICkit3 and this solved my problem!

 


Follow

Get every new post delivered to your Inbox.

Join 574 other followers