POI light toy

At the moment I am teaching a class in collage where the students use CC430 microcontrollers to learn the basics of wireless sensor networks. This class is more like a practical training with a few lessons to teach the theories behind it and explain some of the peripherals of the controller and the RF stuff. The course is structured in 3 parts and each part consists of 3 lessons. Bildschirmfoto 2015-03-31 um 12.03.32

The problem with that is, some students are faster then I expected with finishing the tasks for part 1. So I had to come up with an extra task for part 1. In the task of part 1, the students got taught how to use Flash memory, the UART interface and the SPI bus. The board which is used in the practical training happens to have an SPI port expander with 8 LEDs on it. Thus it is perfectly suitable for a POI light toy. Watch the YouTube Video if you want to see some of this devices in action.

Bildschirmfoto 2015-03-31 um 12.09.57

This type of art works by capturing the movement of the leds with a camera set to long exposure. While moving the led device, the led patterns will change and draw some colors or text. In my case I implemented a simple „Hello World!“ text to prove the concept.


The job for the students is to write some code which can read a text from the serial interface, store that data in flash memory and show the text on startup via the leds on the port expander. So it is a combination of all the newly acquired skills in one project.

Provided for that will be a 5×8 character array in form of a .h file and a simple Spi library for sending out data. Hopefully it takes at least one course date (~3 hours) for the students to figure out how to do that, to keep them busy till part 2 of the course.

As the code is really short I will post it right here. You will find the project as always on Github

// POI
#include "drivers/spi.h"
#include "defines.h"
#include "font.c"</code>

char msg[] = "Hello World! ";
uint8_t len = 14;

void printChar(char c);

void send_Byte(char add, char data){
  SPI_OUT_PORT &amp;= ~CS_PIN;

void main(void){
  WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer

  send_Byte(0x01, 0x00);

    int i=0;

void printChar(char c){
  int i=0;
    int line = font[(c*5)+i];
    send_Byte(0x13, line);

Github: POI_light_toy