4180 lab 1
Dependencies: mbed MCP23S17 PinDetect USBDevice
Revision 3:d84f4a501915, committed 2020-01-15
- Comitter:
- emilywilson
- Date:
- Wed Jan 15 18:38:18 2020 +0000
- Parent:
- 2:7570a8526148
- Child:
- 4:6a7029bf4e1c
- Commit message:
- pb interrupts
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Jan 15 18:37:58 2020 +0000
+++ b/main.cpp Wed Jan 15 18:38:18 2020 +0000
@@ -37,20 +37,10 @@
// myled = !pb;
// Part 2
- float p = 1.0f;
pb1.mode(PullUp);
pb2.mode(PullUp);
wait(0.1);
- if (pb1) {
- if (p > 0) {
- p -= 0.1;
- }
- } else if (pb2) {
- if (p < 1) {
- p += 0.1;
- }
- }
builtinLED = p;
// Part 3