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 0:6929ce2d0e6f, committed 2018-11-26
- Comitter:
- ReidClyburn
- Date:
- Mon Nov 26 15:26:04 2018 +0000
- Commit message:
- Test1
Changed in this revision
diff -r 000000000000 -r 6929ce2d0e6f PinDetect.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PinDetect.lib Mon Nov 26 15:26:04 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/AjK/code/PinDetect/#cb3afc45028b
diff -r 000000000000 -r 6929ce2d0e6f main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Nov 26 15:26:04 2018 +0000 @@ -0,0 +1,52 @@ +#include "mbed.h" +#include "PinDetect.h" + +DigitalOut sprite(p17); +DigitalOut vodka(p15); +DigitalOut rum(p29); +DigitalOut coke(p28); +PinDetect VSbutton(p7); +PinDetect RCbutton(p5); + +void VSbutton_hit_callback (void) +{ + if (VSbutton == 0) + {vodka = 0; + wait(2.5); + vodka = 1;} + while(VSbutton == 0) + { + sprite = 0; + } + sprite = 1; +} + +void RCbutton_hit_callback (void) +{ + if (RCbutton == 0) + {rum = 0; + wait(2.5); + rum = 1;} + while(RCbutton == 0) + { + coke = 0; + } + coke = 1; +} + +int main() { + sprite = 1; + vodka = 1; + rum = 1; + coke = 1; + VSbutton.mode(PullUp); + RCbutton.mode(PullUp); + wait(0.1); + VSbutton.attach_deasserted(&VSbutton_hit_callback); + RCbutton.attach_deasserted(&RCbutton_hit_callback); + VSbutton.setSampleFrequency(); + RCbutton.setSampleFrequency(); + + while(1) + {}; + }
diff -r 000000000000 -r 6929ce2d0e6f mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Nov 26 15:26:04 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/e95d10626187 \ No newline at end of file