Dotstar LED demonstration, with stacker game. Uses 2 buttons, and LPC1768 microcontroller

Dependencies:   DotStar mbed

Committer:
pwalne
Date:
Wed Jan 04 20:53:49 2017 +0000
Revision:
0:9ab173ff6353
working

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pwalne 0:9ab173ff6353 1 /**
pwalne 0:9ab173ff6353 2 * A abstract base class of a light game. This might not even be a light game, but rather a demonstration.
pwalne 0:9ab173ff6353 3 *
pwalne 0:9ab173ff6353 4 *
pwalne 0:9ab173ff6353 5 */
pwalne 0:9ab173ff6353 6 #ifndef _LIGHT_GAME_H
pwalne 0:9ab173ff6353 7 #define _LIGHT_GAME_H
pwalne 0:9ab173ff6353 8
pwalne 0:9ab173ff6353 9 #include <./DotStar/DotStar.h>
pwalne 0:9ab173ff6353 10 #include "mbed.h"
pwalne 0:9ab173ff6353 11
pwalne 0:9ab173ff6353 12 Serial pc1(USBTX, USBRX);
pwalne 0:9ab173ff6353 13
pwalne 0:9ab173ff6353 14 class Light_Game {
pwalne 0:9ab173ff6353 15 public:
pwalne 0:9ab173ff6353 16 Light_Game() {}
pwalne 0:9ab173ff6353 17 virtual void init() {pc1.printf("NOOO");}
pwalne 0:9ab173ff6353 18 virtual void update() {}
pwalne 0:9ab173ff6353 19 virtual void btn1() {}
pwalne 0:9ab173ff6353 20 virtual void btn2() {}
pwalne 0:9ab173ff6353 21 void end() {}
pwalne 0:9ab173ff6353 22 virtual bool isFinished() { return false;}
pwalne 0:9ab173ff6353 23 };
pwalne 0:9ab173ff6353 24
pwalne 0:9ab173ff6353 25 Adafruit_DotStar strip(30, p11, p12);
pwalne 0:9ab173ff6353 26 #endif