Dependencies:   mbed

Revision:
0:bec310bde899
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/uitvoer/zeil.cpp	Tue Sep 27 19:46:30 2011 +0000
@@ -0,0 +1,35 @@
+#include "zeil.h"
+
+Zeil::Zeil() : led(LED3),sail(p22) {
+
+    stand = 50;
+    this->write();
+}
+
+void Zeil::set(int s) {    
+    stand = s;
+
+    if (stand > 100)
+        stand = 100;
+    if (stand < 0)
+        stand = 0;
+       
+    this->write();
+    
+    
+}
+
+
+
+
+int Zeil::get(void) {
+    return stand;
+}
+
+void Zeil::write(void){
+    led = stand / 100.0;
+    sail.pulsewidth(0.001 +  stand / 100000.0);
+}
+    
+    
+