Dmitry Dulyn
/
g474retest
1
main.cpp@0:1882a8a67511, 2021-08-30 (annotated)
- Committer:
- Mr_Dx
- Date:
- Mon Aug 30 09:34:38 2021 +0000
- Revision:
- 0:1882a8a67511
minor
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Mr_Dx | 0:1882a8a67511 | 1 | |
Mr_Dx | 0:1882a8a67511 | 2 | #include "mbed.h" |
Mr_Dx | 0:1882a8a67511 | 3 | #include <string> |
Mr_Dx | 0:1882a8a67511 | 4 | |
Mr_Dx | 0:1882a8a67511 | 5 | #define LED PB_0 // LED Pin |
Mr_Dx | 0:1882a8a67511 | 6 | // Serial pc(PA_2, PA_3); |
Mr_Dx | 0:1882a8a67511 | 7 | Serial pc(PC_6, PC_7); |
Mr_Dx | 0:1882a8a67511 | 8 | DigitalOut led_debug(PB_1); |
Mr_Dx | 0:1882a8a67511 | 9 | |
Mr_Dx | 0:1882a8a67511 | 10 | int main() { // Set potision sensor nonlinearity lookup table |
Mr_Dx | 0:1882a8a67511 | 11 | |
Mr_Dx | 0:1882a8a67511 | 12 | gpio->led = new DigitalOut(LED); |
Mr_Dx | 0:1882a8a67511 | 13 | pc.baud(921600); // set serial baud rate |
Mr_Dx | 0:1882a8a67511 | 14 | |
Mr_Dx | 0:1882a8a67511 | 15 | //pc.attach(&serial_interrupt); // attach serial interrupt |
Mr_Dx | 0:1882a8a67511 | 16 | |
Mr_Dx | 0:1882a8a67511 | 17 | // ============================================================================================================= |
Mr_Dx | 0:1882a8a67511 | 18 | |
Mr_Dx | 0:1882a8a67511 | 19 | while(1) { |
Mr_Dx | 0:1882a8a67511 | 20 | wait(.01); |
Mr_Dx | 0:1882a8a67511 | 21 | pc.printf("hello_wooden"); |
Mr_Dx | 0:1882a8a67511 | 22 | gpio.led->write(0); |
Mr_Dx | 0:1882a8a67511 | 23 | } |
Mr_Dx | 0:1882a8a67511 | 24 | } |
Mr_Dx | 0:1882a8a67511 | 25 |