reads the sensor data
Dependencies: MAG3110 MMA8451Q SLCD TSI mbed-src
Fork of KL46Z by
Diff: main.cpp
- Revision:
- 1:e62070cc6725
- Parent:
- 0:52fadadad843
- Child:
- 2:cec387091316
--- a/main.cpp Mon Oct 14 14:57:22 2013 +0000 +++ b/main.cpp Thu Feb 06 00:46:24 2014 +0000 @@ -15,8 +15,8 @@ PwmOut rled(PTE29); PwmOut gled(PTD5); AnalogIn lightSensor(PTE22); -DigitalIn SW1(PTC3); -DigitalIn SW3(PTC12); +DigitalIn sw1(PTC3); +DigitalIn sw3(PTC12); //AnalogOut lcd03(PTB23); //PwmOut lcd07(PTB7); @@ -41,18 +41,19 @@ gled = onTime - abs(acc51.getAccY()); mag.getValues(&magX, &magY, &magZ); - cout << "MMA8451: " << acc51.getAccX() << "\t" << acc51.getAccY() << "\t" << acc51.getAccZ() << "\n\r" << endl; - cout << "MAG3110: " << magX << "\t" << magY << "\t" << magZ << "\n\r" << endl; - cout << "MAG3110: " << mag.getHeading() << "\n\r" << endl; - wait(holdTime); +// cout << "MMA8451: " << acc51.getAccX() << "\t" << acc51.getAccY() << "\t" << acc51.getAccZ() << "\n\r" << endl; +// cout << "MAG3110: " << magX << "\t" << magY << "\t" << magZ << "\n\r" << endl; +// cout << "MAG3110: " << mag.getHeading() << "\n\r" << endl; +// wait(holdTime); rled = tsi.readPercentage(); gled = tsi.readPercentage(); - cout << "Touch: " << tsi.readPercentage() << "\n\r" << endl; - cout << "SW1: " << SW1 << "\n\r" << endl; - cout << "SW3: " << SW3 << "\n\r" << endl; - cout << "Light Sensor: " << lightSensor << "\n\r" << endl; +// cout << "Touch: " << tsi.readPercentage() << "\n\r" << endl; +// cout << "SW1: " << sw1 << "\n\r" << endl; +// cout << "SW3: " << sw3 << "\n\r" << endl; +// cout << "Light Sensor: " << lightSensor << "\n\r" << endl; + cout << acc51.getAccX(); wait(holdTime); } return 0;