Raspberry Pi – Repeat After Me Game

The Repeat After Me is a simple memory game using the Raspberry Pi, a buzzer and TM1638 module.

The Raspberry Pi will first display a random pattern of sequence. You then have to duplicate the sequence by pressing the buttons. The pattern would get bigger and faster. (You may change the parameter MAXIMUMTEST to increase the number of pattern). Your final score will be displayed when you get the pattern wrong.

If you want to replicate this using Arduino, you make check the Make magazine project on Repeat After Me using Mintduino.

The code was extended from Martin Oldfield‘s code. However,  instead of using bcm2835 library, I opted for the wiringPi library by Gordon.
The kbhit( ) method is from here.

Continue reading

Posted in Game, My Projects, Raspberry Pi, TM1638 | Tagged , , , , , , | 1 Comment

Raspberry Pi – Blink LED test

Similar to the Arduino and Launchpad Blink LED test, let’s try to program the Raspberry Pi to blink on-board LED at rate of 2 Hz (1 second ON, 1 second OFF) using C code.

The code was extended from the example program by Dom and Gert.
I added the kbhit( ) method taken from here.

Continue reading

Posted in Linux, My Projects, Raspberry Pi | Tagged , , , | 2 Comments

Launchpad vs Leonardo – Keypad & Serial LCD

The next challenge is interfacing with 12 button matrix keypad  and serial LCD .

In this challenge, the micros need to read the keypad input and display it on the serial LCD.
If the # key is entered after the * key, the LCD will be cleared.

The keypad is a basic 12 button input that is setup in a matrix format.  They are pretty cheap to get. You can buy them from Sparkfun or Ebay,
If you want to learn more about the keypad, you can read the how-to from Arduino website and the Application Note from TI.

The serial LCD is the same module from previous blog post.

For the Arduino, I used the Keypad library and extended the HelloKeypad.pde source code to include the printout to the serial LCD.

For the Launchpad, I extended the TI’s msp430g2xx1_ta_uart9600.c sample code to include the interface with the matrix keypad.
See below for the connection diagram for the Launchpad.

Continue reading

Posted in Arduino, MSP430, My Projects, serial lcd | Tagged , , , , , , , | 1 Comment

Getting started with Arch Linux on the Raspberry Pi

This is just a summarised guide to get Arch Linux on Raspberry Pi.
This post is mainly to document how I set up and got the Pi running, just in case I lost the SD card or anything worst.
If this post helps you and others, hey… that is great!

  1. Download the Arch distribution for Raspberry Pi. Then unzip the image.
  2. Download the Win32DiskImager.
  3. Insert empty SD card on PC, then run Win32DiskImager.
  4. Select the SD card drive (make sure select the right one!). Select the Arch Linux image file. Double check. Then, click Write.
  5. Once done, remove the SD card from PC and insert it to Raspberry Pi.
  6. Connect peripherals to the Pi, at least a keyboard, LAN and monitor.
  7. Apply power to the Pi and boot it up.
  8. Login as root (password root)
    Continue reading
Posted in Linux, My Projects, Raspberry Pi | Tagged , , , , , | 4 Comments

Launchpad vs Leonardo – DHT11 sensor & Serial LCD

The next challenge is interfacing with serial LCD and DHT11 Ambient Humidity & Temperature sensor .

In this challenge, the micros need to read the proprietary one wire signal from DHT11 sensor and display it on the serial LCD.

Continue reading

Posted in Arduino, MSP430, My Projects, sensor, serial lcd | Tagged , , , , , , , , , | Leave a comment

Launchpad vs Leonardo – Ultrasonic Sensor

The next challenge is proximity detector using the ultrasonic sensor.

In this challenge, the micros need to capture the PWM signal transmitted by the ultrasonic sensor. The distance of the nearby object is translated on to four LEDs. The micros also need to buzz if the object is too near.

Continue reading

Posted in Arduino, MSP430, My Projects, ultrasonic | Tagged , , , , , , , | 5 Comments