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:227de563fbb6, committed 2018-08-08
- Comitter:
- 771_8bit
- Date:
- Wed Aug 08 08:37:08 2018 +0000
- Commit message:
- LPC11U35????????
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Aug 08 08:37:08 2018 +0000
@@ -0,0 +1,36 @@
+#include "mbed.h"
+DigitalOut leds[] = {
+ DigitalOut( P0_19 ),
+ DigitalOut( P0_18 ),
+ DigitalOut( P0_17 )
+};
+DigitalIn sws[] = {
+ DigitalIn( P0_14 ),
+ DigitalIn( P0_15 ),
+ DigitalIn( P0_16 )
+};
+BusOut ledBus( P0_21, P0_3, P0_2, P0_20,P1_19 );
+AnalogIn adc(P0_23);
+int a =0;
+int main()
+{
+
+ for(int i = 0; i <3; i++){
+ sws[i].mode(PullUp);
+ }
+
+ while(1) {
+ ledBus = int(adc.read()*16);
+ for(int i = 0; i <3; i++){
+ leds[i] = !sws[i];
+ }
+ }/*
+ while(1) {
+ ledBus = 0b10101;
+ wait(2);
+ for(int i = 0; i <32; i++) {
+ ledBus = i;
+ wait_us(i*20);
+ }
+ }*/
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Aug 08 08:37:08 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/a7c7b631e539 \ No newline at end of file