![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
piano 4 octaves, 8 notes, 3 threads, 2 outputs, no bug, clean code, comments, remove old .h
Fork of Nucleo_piano_CS435 by
main.cpp
- Committer:
- bcostm
- Date:
- 2017-11-23
- Revision:
- 2:35f13b7f3659
- Parent:
- 0:5701b41769fd
- Child:
- 3:ca0d5d72f842
File content as of revision 2:35f13b7f3659:
#include "mbed.h" void print_char(char c = '*') { printf("%c", c); fflush(stdout); } Thread thread; DigitalOut led1(LED1); void print_thread() { while (true) { wait(1); print_char(); } } int main() { printf("\n\n*** RTOS basic example ***\n"); thread.start(print_thread); while (true) { led1 = !led1; wait(0.5); } }