Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: 4DGL-uLCD-SE mbed AD5206
Diff: main.cpp
- Revision:
- 1:d4dce9aeea69
- Parent:
- 0:1db7e816a191
- Child:
- 2:a906fdd1c2fb
--- a/main.cpp	Tue Dec 01 06:53:15 2015 +0000
+++ b/main.cpp	Tue Dec 01 07:47:19 2015 +0000
@@ -11,13 +11,14 @@
 
 #include "mbed.h"
 #include "uLCD_4DGL.h"
+#include <AD5206.h>
 
 //----- Objects for devices----------------------
 Serial pc(USBTX, USBRX);
 Serial funGen(p28, p27);
 uLCD_4DGL lcd(p13, p14, p15);
-
-
+AD5206 digipot(p5, p6, p7,p8);//MOSI, MISO, CLK, CS'
+int val;
 
 void initialize_LCD(){
     lcd.baudrate(3000000);
@@ -34,7 +35,12 @@
     initialize_LCD();
     
     while (1){
-        funGen.printf("0,3000\n");
-        wait(500);
+        funGen.printf("1,3000\n");
+        
+        
+        digipot.write_AD5206(0,val);
+        val=val+10;
+        if (val>=255){val=0;}
+        wait(1);
     }
 }