Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:75b2a18e16ff, committed 2014-03-13
- Comitter:
- mascheong
- Date:
- Thu Mar 13 19:21:07 2014 +0000
- Parent:
- 0:b016fab90911
- Commit message:
- v2.0
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Mar 12 16:27:55 2014 +0000
+++ b/main.cpp Thu Mar 13 19:21:07 2014 +0000
@@ -5,13 +5,13 @@
DigitalOut learn(p7);
DigitalOut mode(p8);
DigitalOut discrete(p9);
-DigitalOut led(LED1);
-DigitalOut led2(LED2);
+DigitalOut led(LED1); //corresponds to Output1
+DigitalOut led2(LED2); //corresponds to Output2
int main() {
mode = 0; //set chip mode (0 for mode 1, 1 for mode 2)
- discrete = 1; //for discrete button mode, mode and discrete should be set to 0
+ discrete = 0; //for discrete button mode, mode and discrete should be set to 0 otherwise set to 1
learn = 0; //pull pin low to activate chip learning
while(in1 == 0) {}; //wait until output1 goes high
learn = 1; //pull up pin