Nieuwe kinematica + potmeter
Dependencies: HIDScope MODSERIAL QEI biquadFilter mbed
Fork of Project_script_union_potmeter by
main.cpp@3:a3ad58758696, 2018-09-11 (annotated)
- Committer:
- MarijkeZondag
- Date:
- Tue Sep 11 15:06:12 2018 +0000
- Revision:
- 3:a3ad58758696
- Parent:
- 2:2f4444f1504d
- Child:
- 4:fbea05c8fe2b
getc weggehaald;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
vsluiter | 0:c8f15874531b | 1 | #include "mbed.h" |
vsluiter | 0:c8f15874531b | 2 | #include "MODSERIAL.h" |
vsluiter | 0:c8f15874531b | 3 | |
vsluiter | 0:c8f15874531b | 4 | DigitalOut myled(LED_GREEN); |
vsluiter | 0:c8f15874531b | 5 | MODSERIAL pc(USBTX, USBRX); |
MarijkeZondag | 2:2f4444f1504d | 6 | DigitalIn button(PTA4); |
vsluiter | 0:c8f15874531b | 7 | |
vsluiter | 0:c8f15874531b | 8 | int main() |
MarijkeZondag | 3:a3ad58758696 | 9 | { |
vsluiter | 0:c8f15874531b | 10 | pc.baud(115200); |
Gijsvanoort | 1:40470bc517f1 | 11 | pc.printf("Hello World!\r\n"); |
vsluiter | 0:c8f15874531b | 12 | |
MarijkeZondag | 2:2f4444f1504d | 13 | while (true) |
MarijkeZondag | 2:2f4444f1504d | 14 | { |
MarijkeZondag | 2:2f4444f1504d | 15 | myled==1; |
MarijkeZondag | 2:2f4444f1504d | 16 | |
MarijkeZondag | 2:2f4444f1504d | 17 | if (button==0) |
MarijkeZondag | 2:2f4444f1504d | 18 | { |
MarijkeZondag | 2:2f4444f1504d | 19 | wait(0.5f); // wait a small period of time |
MarijkeZondag | 2:2f4444f1504d | 20 | pc.printf("%c \n",c); |
MarijkeZondag | 2:2f4444f1504d | 21 | myled = !myled; // toggle a led |
MarijkeZondag | 2:2f4444f1504d | 22 | } |
vsluiter | 0:c8f15874531b | 23 | } |
vsluiter | 0:c8f15874531b | 24 | } |