first compiled version

Dependencies:   mbed-rtos mbed C12832_lcd LM75B

Files at this revision

API Documentation at this revision

Comitter:
nleoni
Date:
Wed Feb 26 05:29:44 2014 +0000
Child:
1:83bc9f91d154
Commit message:
RTOS first compile

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib 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 Feb 26 05:29:44 2014 +0000
@@ -0,0 +1,47 @@
+#include "mbed.h"
+#include "rtos.h"
+
+AnalogIn pot1(p19);
+Queue<float,10> potReadingQueue;
+
+void lcdUpdate(void const*){
+while(1){
+       osEvent evt = potReadingQueue.get();
+        if (evt.status == osEventMail) {
+            float *queue = (float*)evt.value.p;
+            printf("\nVoltage: %.2f V\n\r"   , *queue);
+      
+            Thread::wait(1000);
+        }
+    }
+}
+
+void readPOT(void const*){    
+while(1){
+        float *queue;
+        *queue = pot1; 
+        potReadingQueue.put(queue);
+     
+    Thread::wait(10000);
+    }
+    
+}
+
+void readTemp(void const*){
+    
+}
+
+void threadCookie(void const*){
+    
+}
+
+DigitalOut myled(LED1);
+
+int main() {
+Thread threadLCD(lcdUpdate);
+Thread threadPOT(readPOT);
+Thread threadTemp(readTemp);
+
+    while(1) {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-rtos.lib	Wed Feb 26 05:29:44 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed-rtos/#f88660a9bed1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Feb 26 05:29:44 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/8e73be2a2ac1
\ No newline at end of file