homework 7
Dependencies: mbed-rtos mbed C12832_lcd LM75B
Diff: main.cpp
- Revision:
- 91:b54500888b67
- Parent:
- 90:d9bb516141f1
- Child:
- 92:be8d69aba1fc
--- a/main.cpp Thu Sep 12 16:35:45 2013 +0000 +++ b/main.cpp Thu Sep 12 16:51:55 2013 +0000 @@ -33,7 +33,7 @@ #define TEMPCLOCKS 1 // temperature-measuring period in S. #define PIPEDATASIZE 8 // dimension of tPipeData. #define THREAD_1_WAITmS 400 // thread 1 wait in mS. - #define THREAD_2_WAITmS 20 // LCD thread wait. + #define THREAD_2_WAITmS 1 // LCD thread wait. #define THREAD_3_WAITmS 80 // thread 3 wait in mS. #define THREAD_4_WAITmS 1 // thread 4 wait in mS. #define THREAD_5_WAITmS 1 // FSM thread wait. @@ -114,6 +114,7 @@ DigitalOut led1(LED3); DigitalOut led2(LED2); DigitalOut led3(LED1); + DigitalOut speaker(p26); // speaker device. InterruptIn iJoyStickUp (p15); // joystick up rising edge. InterruptIn iJoyStickDown (p12); // joystick down rising edge. @@ -204,6 +205,16 @@ // the message-receiving threads need 'else' for message-receive-timeout. + + while(1) + { + speaker = 1; + wait(0.001); + speaker = 0; + wait(0.001); + + + } while(1) { @@ -340,7 +351,6 @@ led0 = 0; if (dFSMstate != dFSMstateLast) // if just entered state. { - dButtonStart == 0; // cancel start button. } giLCD.dTotalCookTime = giRemainingTime.dTotalTime;