David Wynn
/
mbed_max2719
ECE Project
Diff: main.cpp
- Revision:
- 1:37f364164ca9
- Parent:
- 0:6be425a138b2
- Child:
- 2:577acf73d01f
--- a/main.cpp Sun Apr 10 19:02:41 2016 +0000 +++ b/main.cpp Sun Apr 10 19:19:15 2016 +0000 @@ -75,9 +75,6 @@ spi.frequency(1000000); // SCLK = 1 MHz Init_MAX7219(); // Initialize the LED controller MMA8451Q acc(SDA, SCL, MMA8451_I2C_ADDRESS); - PwmOut rled(LED1); - PwmOut gled(LED2); - PwmOut bled(LED3); while (1) { @@ -86,18 +83,19 @@ x = acc.getAccX(); y = acc.getAccY(); z = acc.getAccZ(); + /* rled = 1.0f - abs(x); gled = 1.0f - abs(y); bled = 1.0f - abs(z); - direction(x,y); - wait(0.5f); + direction(x,y);*/ + //wait(0.5f); for(int i=1; i<9; i++) // Write first character (8 rows) SPI_Write2(i,led1[i-1]); wait(1); // 1 sec delay for(int i=1; i<9; i++) // Write second character SPI_Write2(i,led2[i-1]); - wait(1); // 1 sec delay */ + wait(1); // 1 sec delay }