![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
A project that aims at making a LED based light system controlled by microcontroller and with BLE (soon) with smooth color transitions.
main.cpp
- Committer:
- ledonger
- Date:
- 2017-08-18
- Revision:
- 1:8b80523d8959
- Parent:
- 0:b350f8395bff
- Child:
- 2:0bbd4fc5e202
File content as of revision 1:8b80523d8959:
#include "mbed.h" #include "LEDManager.h" Timer timer; //Serial pc(USBTX,USBRX,921600); LEDManager *led1 = new LEDManager(D11,10000); LEDManager *led2 = new LEDManager(D4,10000); LEDManager *led3 = new LEDManager(D2,10000); LEDManager *led4 = new LEDManager(D5,10000); LEDManager *led5 = new LEDManager(D6,10000); LEDManager *led6 = new LEDManager(D7,10000); LEDManager *led7 = new LEDManager(D8,10000); LEDManager *led8 = new LEDManager(D9,10000); LEDManager *led9 = new LEDManager(D10,10000); int main() { //pc.printf("Starting...\n"); printf("Test procedure\n"); timer.start(); int time = timer.read_us(); while(1) { time = timer.read_us(); led1->processLED(time); led2->processLED(time); led3->processLED(time); led4->processLED(time); led5->processLED(time); led6->processLED(time); led7->processLED(time); led8->processLED(time); led9->processLED(time); //printf("%d\n",timer.read_us()-time); } }