This program is done as an Lab assignment for ECE2036.

Dependencies:   4DGL-uLCD-SE PinDetect SDFileSystem mbed

Fork of mythermostat by jim hamblen

This program is a lab assignment to ECE 2036. It uses uLCD, pushputtons and SDCard via sdFileSystem. This is designed as a concept to train animal that could be used by biologist to determine if lemurs have a concept of numbers. uLCD is divided into two different rectangle. In each rectangle, program generate random shapes of different color. Pushbutton is used to select which side has smaller number of shapes. Each trial, result is stored in sdCard as datalogging.

Shiftbrite.h

Committer:
4180_1
Date:
2014-01-23
Revision:
4:9a4d22a279b3
Parent:
2:58d85409f7ff

File content as of revision 4:9a4d22a279b3:

#include "mbed.h"

//Setup a new class for a Shiftbrite RGB LED module
class Shiftbrite
{
public:
    Shiftbrite(PinName pin_e, PinName pin_l, PinName pin_do, PinName pin_di, PinName pin_clk);
    void write(int red, int green, int blue);

private:
//class sets up the pins
    DigitalOut _pin_e;
    DigitalOut _pin_l;
    SPI _spi;
};

Shiftbrite::Shiftbrite(PinName pin_e, PinName pin_l, PinName pin_do, PinName pin_di, PinName pin_clk)
    : _pin_e(pin_e), _pin_l(pin_l), _spi(pin_do, pin_di, pin_clk)
{
 // ADD CODE HERE
}

void Shiftbrite::write(int red, int green, int blue)
{
 // ADD CODE HERE
}