test

Dependencies:   mbed MMA8452Q

Fork of HelloWorld by Simon Ford

Revision:
24:0227ae0ad260
Parent:
23:262e3e171aaf
Child:
25:16a041dd21db
--- a/main.cpp	Mon Sep 04 17:41:14 2017 +0000
+++ b/main.cpp	Mon Sep 04 17:49:13 2017 +0000
@@ -2,8 +2,8 @@
 #include "MMA8452Q.h"
 
 Serial pc(USBTX, USBRX); // tx, rx
-SPI accel(p11,p12,p13);
-DigitalOut cs(p14);
+//SPI accel(p11,p12,p13);
+//DigitalOut cs(p14);
 // Communication I2C
 //I2C comI2C(p9,p10); // sda, scl
 
@@ -102,10 +102,10 @@
         }
          
         // Pour la communication UART
-         accel.write(0x76); // Clear display
+         UART3Transmit(0x76); // Clear display
          wait(0.1);
-         accel.write(0x77); // Decimal control command
-         accel.write(0x04);// Turn on decimal
+         UART3Transmit(0x77); // Decimal control command
+         UART3Transmit(0x04);// Turn on decimal
          wait(0.1);
          UART3Transmit(digits[3]);
          wait(0.1);