Kyle Cassar / Mbed 2 deprecated DACAD7390

Dependencies:   mbed

Revision:
5:1ce3ec1e5f8b
Parent:
4:0c327b37ddc1
--- a/main.cpp	Sun Apr 06 20:19:56 2014 +0000
+++ b/main.cpp	Sun Apr 13 19:45:35 2014 +0000
@@ -3,22 +3,15 @@
 
 SPI spi(p5,p6,p7);
 AD7390 Test(spi,p10,p11);
-DigitalOut Led(LED1);
 
 int main(){
-    Test.Init();
+    Test.Init(10000000);
 while (true){
     Test.Reset();
-    Test.WriteL(2.5,3.3);
-    Led = 1;
-    wait(5);
-    Test.Reset();
-    Led = 0;
-    Test.WriteL(1.5,3.3);
-    Led = 1;
-    wait(5);
-    Led = 0;
-    
+    for (float V = 0; V !=3.3; V=V+0.005){
+        Test.WriteL(V,3.3);
+        wait(0.02);
+    }
 
 }
 }