Shell code for spinning LED using mbed
Dependencies: SDFileSystem mbed-rtos mbed wave_player
Diff: main.cpp
- Revision:
- 0:6fdd6e6268f3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun Feb 21 00:33:32 2016 +0000 @@ -0,0 +1,33 @@ +/* +ME6408 Project +Part2, spining LED, POV display module +*/ +#include "mbed.h" +#include "rtos.h" +#include "SDFileSystem.h" //read SD card +#include "wave_player.h" //play sound + +SDFileSystem sd(p5, p6, p7, p8, "sd"); //SD card, + //in case RAM is not sufficient +AnalogOut DACout(p18); +wave_player waver(&DACout); + +Serial pc(USBTX, USBRX); // tx, rx, debug serial +Serial wireless_module(p28, p27); //wireless module connection + +InterruptIn photo_interrupt(p5); + + +//Declare LED array code here + +void photo_int_isr() { + +} + +int main(){ + photo_interrupt.rise(&photo_int_isr); // attach the address of the flip function to the rising edge + + while (true) { + + } +} \ No newline at end of file