A project similar to http://mbed.org/users/lhiggs/code/UM6_IMU_AHRS_2012/, where I'm trying to log data from a UM6 (CH Robotics orientation sensor) and a GPS transceiver to an sd card. I've adapted LHiggs code to include ModGPS. For sum reason a soon as I pick up a gps signal the UM6 data freezes i.e. the time and gps signals continue to print out but the UM6 signals fixes on a single value.
Dependencies: MODGPS MODSERIAL SDFileSystem mbed
main.cpp@0:52295643d083, 2013-05-23 (annotated)
- Committer:
- njewin
- Date:
- Thu May 23 13:29:26 2013 +0000
- Revision:
- 0:52295643d083
- Child:
- 1:9fe40d9ac0f5
flash LED using enable switch
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
njewin | 0:52295643d083 | 1 | #include "mbed.h" |
njewin | 0:52295643d083 | 2 | |
njewin | 0:52295643d083 | 3 | LocalFileSystem local("local"); // sets up local file on mbed |
njewin | 0:52295643d083 | 4 | Serial pc(USBTX, USBRX); // sets up serial connection to pc terminal |
njewin | 0:52295643d083 | 5 | |
njewin | 0:52295643d083 | 6 | DigitalOut myled(LED1); // debug LED |
njewin | 0:52295643d083 | 7 | DigitalIn enable(p10); // enable signal for logging data to file |
njewin | 0:52295643d083 | 8 | |
njewin | 0:52295643d083 | 9 | int main() { |
njewin | 0:52295643d083 | 10 | while(1) { |
njewin | 0:52295643d083 | 11 | if(enable==1) { |
njewin | 0:52295643d083 | 12 | myled=1; |
njewin | 0:52295643d083 | 13 | wait(0.2); |
njewin | 0:52295643d083 | 14 | myled=0; |
njewin | 0:52295643d083 | 15 | wait(0.2); |
njewin | 0:52295643d083 | 16 | } |
njewin | 0:52295643d083 | 17 | } |
njewin | 0:52295643d083 | 18 | } |