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:f612b9501960, committed 2021-10-17
- Comitter:
- tollidal
- Date:
- Sun Oct 17 10:28:03 2021 +0000
- Commit message:
- Strawberry Forever Light sensor controlled LED
Changed in this revision
diff -r 000000000000 -r f612b9501960 C12832.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/C12832.lib Sun Oct 17 10:28:03 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/askksa12543/code/C12832/#990d5eec2ef6
diff -r 000000000000 -r f612b9501960 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sun Oct 17 10:28:03 2021 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h" //LPC 1768 header file
+#include "C12832.h" //LCD header file
+
+
+//read ambiant light levels
+
+C12832 lcd(p5, p7, p6, p8, p11); //lcdscreen
+DigitalOut myled(p14); //assigning greenled as digital output pin14
+AnalogIn ldr(p15); //assigning ldr as analog input p15
+
+
+int main()
+{
+ while(1) {
+ float ldrout=ldr.read(); //read ldr value
+ lcd.printf("ldr value is %f\n :",ldrout); //print ldr value on LCD
+ if(ldrout<0.6) { //if ldr value is smaller than 0.6 green LED turns on
+
+ myled = 1; //LED on
+ } else {
+ myled=0; //LED off
+ }
+ }
+}
+
+
+
+
diff -r 000000000000 -r f612b9501960 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Oct 17 10:28:03 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file