4180 IMU parts (I2C, uLCD, RS232, USB Serial, SD)

Dependencies:   4DGL-uLCD-SE LSM9DS1_Library_cal SDFileSystem mbed

Files at this revision

API Documentation at this revision

Comitter:
mikeb
Date:
Thu Feb 11 22:46:43 2016 +0000
Parent:
0:2fd46a8b3964
Child:
2:f17a67920767
Commit message:
workin on bubble level, no tests of anything

Changed in this revision

4DGL-uLCD-SE.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/4DGL-uLCD-SE.lib	Thu Feb 11 22:46:43 2016 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/4180_1/code/4DGL-uLCD-SE/#2cb1845d7681
--- a/main.cpp	Thu Feb 11 22:21:06 2016 +0000
+++ b/main.cpp	Thu Feb 11 22:46:43 2016 +0000
@@ -1,5 +1,6 @@
 #include "mbed.h"
 #include "LSM9DS1.h"
+#include "uLCD_4DGL.h"
 #define PI 3.14159
 // Earth's magnetic field varies by location. Add or subtract
 // a declination to get a more accurate heading. Calculate
@@ -11,6 +12,7 @@
 DigitalIn sel(p21);
 Serial pc(USBTX, USBRX);
 Serial device(p13, p14); 
+uLCD_4DGL uLCD(p27,p28,p30); // serial tx, serial rx, reset pin;
 
 
 // Calculate pitch, roll, and heading.
@@ -51,6 +53,13 @@
     
 }
 
+void bubLev(float ax, float ay, float az, float oldx, float oldy){
+    
+    uLCD.filled_circle(63, 63, 40, 0x0000FF);
+    uLCD.filled_circle(ax/az*40+63, ay/az*40+63, 5, 0xFF00FF);    
+    
+}
+
 
 
 
@@ -60,6 +69,7 @@
     //device.format(8N1);
     LSM9DS1 IMU(p9, p10, 0xD6, 0x3C);
     sel.mode(PullUp);
+    uLCD.baudrate(3000000);
     IMU.begin();
     if (!IMU.begin()) {
         pc.printf("Failed to communicate with LSM9DS1.\n");