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.

Committer:
4180_1
Date:
Thu Jan 23 16:47:05 2014 +0000
Revision:
4:9a4d22a279b3
Parent:
2:58d85409f7ff
ver 1.0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
4180_1 2:58d85409f7ff 1 #include "mbed.h"
4180_1 2:58d85409f7ff 2
4180_1 2:58d85409f7ff 3 //Setup a new class for a Shiftbrite RGB LED module
4180_1 2:58d85409f7ff 4 class Shiftbrite
4180_1 2:58d85409f7ff 5 {
4180_1 2:58d85409f7ff 6 public:
4180_1 2:58d85409f7ff 7 Shiftbrite(PinName pin_e, PinName pin_l, PinName pin_do, PinName pin_di, PinName pin_clk);
4180_1 2:58d85409f7ff 8 void write(int red, int green, int blue);
4180_1 2:58d85409f7ff 9
4180_1 2:58d85409f7ff 10 private:
4180_1 2:58d85409f7ff 11 //class sets up the pins
4180_1 2:58d85409f7ff 12 DigitalOut _pin_e;
4180_1 2:58d85409f7ff 13 DigitalOut _pin_l;
4180_1 2:58d85409f7ff 14 SPI _spi;
4180_1 2:58d85409f7ff 15 };
4180_1 2:58d85409f7ff 16
4180_1 2:58d85409f7ff 17 Shiftbrite::Shiftbrite(PinName pin_e, PinName pin_l, PinName pin_do, PinName pin_di, PinName pin_clk)
4180_1 2:58d85409f7ff 18 : _pin_e(pin_e), _pin_l(pin_l), _spi(pin_do, pin_di, pin_clk)
4180_1 2:58d85409f7ff 19 {
4180_1 2:58d85409f7ff 20 // ADD CODE HERE
4180_1 2:58d85409f7ff 21 }
4180_1 2:58d85409f7ff 22
4180_1 2:58d85409f7ff 23 void Shiftbrite::write(int red, int green, int blue)
4180_1 2:58d85409f7ff 24 {
4180_1 2:58d85409f7ff 25 // ADD CODE HERE
4180_1 2:58d85409f7ff 26 }