Street light control system banate h, onboard LED ko light jaise use karke. Isme sabse important part h ldr ka min, max, ambient rakhke thresholds nikalna.

Dependencies:   HysteresisIn mbed

Files at this revision

API Documentation at this revision

Comitter:
akashlal
Date:
Fri Jul 01 09:25:42 2016 +0000
Commit message:
na

Changed in this revision

HysteresisIn.lib Show annotated file Show diff for this revision Revisions of this file
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
diff -r 000000000000 -r 2821276434a8 HysteresisIn.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HysteresisIn.lib	Fri Jul 01 09:25:42 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/kayekss/code/HysteresisIn/#fe43537bd3d6
diff -r 000000000000 -r 2821276434a8 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jul 01 09:25:42 2016 +0000
@@ -0,0 +1,13 @@
+#include "mbed.h"
+#include "HysteresisIn.h"
+
+//analog pin, two thresholds and initial state 
+HysteresisIn    ldr(PTB1, 0.2, 0.4, 0);
+DigitalOut led(PTD1);
+
+int main() {
+    while(1) {
+        led = 1-ldr.read();//led.write(ldr.read()); //boolean value
+     }
+}
+
diff -r 000000000000 -r 2821276434a8 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jul 01 09:25:42 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34
\ No newline at end of file