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:72dfc4f5ad33, committed 2018-11-15
- Comitter:
- martwerl
- Date:
- Thu Nov 15 17:27:11 2018 +0000
- Commit message:
- Bertl_Buttons_Leds
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BertlLib.lib Thu Nov 15 17:27:11 2018 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/hollegha2/code/BertlLib/#20c3213c3ada
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Bertl_Buttons_Leds.cpp Thu Nov 15 17:27:11 2018 +0000 @@ -0,0 +1,38 @@ +#include "mbed.h" +#include "Serial_HL.h" +#include "Bertl14.h" +#include "BertlObjects.h" + +// main=2^0 LS ENC 2^2 +BusOut boardPow(p30, P1_6, P1_7); +BusOut leds1(LED1,LED2,LED3,LED4); + +// ls5 nur beim Betrl15 +// AnalogInHL ls1(p18), ls2(p16), ls3(p19), ls4(p17); // B14 + +AnalogInHL ls1(p18), ls2(p16), ls3(p20), ls4(p19), ls5(p17); // B15 + + + +int main(void) +{ + boardPow=3; wait_ms(10); // boardPow = 3! + InitBertl(); + + while(1) + { + pex.ReadButtons(); + if(ls1.Read()>600 && pex.IsButton(BTN_FLL)) + leds1 = 1; + if(ls2.Read()>600 && pex.IsButton(BTN_FL)) + leds1 = 2; + if(ls4.Read()>600 && pex.IsButton(BTN_FR)) + leds1 = 4; + if(ls5.Read()>600 && pex.IsButton(BTN_FRR)) + leds1 = 8; + else + leds1 = 0; + } + + return 1; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Nov 15 17:27:11 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/aa5281ff4a02 \ No newline at end of file