Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
I try to use a Ticker Tic for some sort of sequencing. Tic is attached to sub1() /* Tic.attach(&sub1,DT1) */ that runs after the specific time DT1; Sub1 detaches Tic and attaches Tic to sub2( ) that will run after a specific time DT2; Any suggestions why it does not run?
Ticker *ptrTicTac; volatile int i=0; void sub1() { pc.printf("Hi \t%d \n\r",i); i++; if (i>=10) { ptrTicTac->detach(); }; }; main() { int KBChar; ptrTicTac->attach(&sub1,2); while (1) { KBChar=pc.getc(); if (KBChar=='b') { break; }; }; }