This program is example of using PAW_Sensor Library.

Dependencies:   PAW_Sensor mbed

Files at this revision

API Documentation at this revision

Comitter:
matsu
Date:
Sun Nov 09 08:29:23 2014 +0000
Child:
1:0ecf7a761340
Commit message:
First Upload.

Changed in this revision

PAW_Sensor.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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PAW_Sensor.lib	Sun Nov 09 08:29:23 2014 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/matsu/code/PAW_Sensor/#6a493f73860c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Nov 09 08:29:23 2014 +0000
@@ -0,0 +1,34 @@
+#include "mbed.h"
+#include "paw.h"
+
+Serial pc( USBTX, USBRX ); 
+const unsigned long baudrate = 115200;
+
+// paw( LED1, LED2, PHOTO1, PHOTO2 )
+PAW paw( p8, p9, p16, p17 );
+paw_value g_value;
+
+PAW paw_2( p10, p11, p18, p19 );
+paw_value g_value_2;
+
+Ticker run;
+
+
+void run_paw_sensor()
+{
+    if( paw.process_paw() == STATE_1 )
+    {
+        paw.print( &pc );   
+    }
+}
+
+int main() 
+{
+    // Initializing Serial Communication
+    pc.baud( baudrate );
+    pc.format( 8, Serial::None, 1 );
+    
+    run.attach_us(&run_paw_sensor, 500);
+    
+    while(1);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Nov 09 08:29:23 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/031413cf7a89
\ No newline at end of file