Priyank Kalgaonkar
/
TALab3BJoystickECE595
ECE595 - Lab 3 Part 2 - Joystick Program - TA
main.cpp@2:af5f9d175643, 2021-01-16 (annotated)
- Committer:
- priyank12p
- Date:
- Sat Jan 16 00:15:29 2021 +0000
- Revision:
- 2:af5f9d175643
- Parent:
- 1:af23cbc41990
- Child:
- 3:b7e534ebe607
Initial Commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
priyank12p | 0:4cb6e9d0da34 | 1 | #include "mbed.h" |
priyank12p | 2:af5f9d175643 | 2 | DigitalIn button(D2); |
priyank12p | 1:af23cbc41990 | 3 | |
priyank12p | 2:af5f9d175643 | 4 | int main (void) { |
priyank12p | 2:af5f9d175643 | 5 | int cnt = 0; |
priyank12p | 2:af5f9d175643 | 6 | while(1) { |
priyank12p | 2:af5f9d175643 | 7 | if (button) { |
priyank12p | 2:af5f9d175643 | 8 | cnt++; |
priyank12p | 2:af5f9d175643 | 9 | printf("Touch detected %d\n", cnt); |
priyank12p | 2:af5f9d175643 | 10 | while(button); |
priyank12p | 2:af5f9d175643 | 11 | } |
priyank12p | 0:4cb6e9d0da34 | 12 | } |
priyank12p | 1:af23cbc41990 | 13 | } |