The original snake game for the mbedgc
Dependencies: mbed EthernetNetIf HTTPClient
Fork of SimpleLib_03272011 by
mbedGC/mbedgc.h
- Committer:
- jp
- Date:
- 2013-08-22
- Revision:
- 2:da81fd97aa86
- Parent:
- 0:011be8250218
File content as of revision 2:da81fd97aa86:
#include "mbed.h" #include "colors.h" #include "timers.h" #include "I2CConfig.h" #include "WiiClassicControllerReader.h" #define fbW 121//121 is max//129 #define fbH 121//121 DigitalOut vSync(p29); DigitalOut hSync(p30); DigitalOut soundPin(p18); int soundNote = 4000; int soundNoteHalf = 2000; unsigned int hsync_count = 0x80000; int hsync_count_adder = 1; int logic_count = 0; //Serial pc(USBTX, USBRX); DigitalOut led1(LED1); WiiClassicControllerReader ctrlrA(I2CPort_A::SDA, I2CPort_A::SCL); void fill(unsigned char); void setup(); void loop(); void blankFB(); int getButton(WiiClassicControllerReader* const ctrlr); void drawRectangle(int x, int y, int width, int height, unsigned char color); unsigned int frame = 0; unsigned char framebuffer[fbH][fbW];