The intent of this project is to use and learn, inverse kinematics, pid control of position, touch control using smartgpu_v1 board for viewing data or debug messages while moving a 4 DOF robotic arm.

Dependencies:   AX12 InversKinem PIDPositionController SMARTGPU SerialHalfDuplex mbed

http://mbed.org/users/aimen/notebook/4dofroboticarmax12_lpc1768-with-smartgpu/

Revision:
0:91d276232027
Child:
2:de8b38a39938
diff -r 000000000000 -r 91d276232027 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Apr 01 06:50:49 2014 +0000
@@ -0,0 +1,35 @@
+#include "mbed.h"
+#include "AX12.h"
+#include "SMARTGPU.h"
+
+
+SMARTGPU lcd(p28,p27,p26);        //(TX,RX,Reset);
+DigitalOut myled1(LED1);
+DigitalOut myled2(LED2);
+DigitalOut myled3(LED3);
+DigitalOut myled4(LED4);
+AX12 myax12_1(p9,p10,1);        //(TX,RX, ID of servo);
+
+int main() {
+
+  lcd.reset();                    //physically reset SMARTGPU
+  lcd.start();                    //initialize the SMARTGPU processor
+  lcd.baudChange(1000000);        //set high baud for fast drawing
+
+  while(1) {
+  
+        myled1 = 1;
+        lcd.string(10,10,300,220,YELLOW,FONT3,TRANS,"Before set goal 0");  //write a string on the screen
+        myax12_1.SetGoal(0);    // go to 0 degrees
+        lcd.string(10,70,300,220,YELLOW,FONT3,TRANS,"after goal 0");  //write a string on the screen
+        wait_ms(1000);
+        myled1 = 0;
+        myled4 = 1;
+        lcd.string(10,10,300,220,YELLOW,FONT3,TRANS,"Before set goal 300");  //write a string on the screen
+        myax12_1.SetGoal(300);  // go to 300 degrees
+        lcd.string(10,70,300,220,YELLOW,FONT3,TRANS,"after goal 300");  //write a string on the screen
+        wait_ms(1000);
+        myled4 = 0;
+    }//end of main while loop
+}
+