It's my first experience with the SMLib so chances are I have misunderstood something, but i just can't figure out why this code doesn't work as expected.
I have read and re-read the description for the library here: Arduino Playground - SMlib
raaen:
It's my first experience with the SMLib so chances are I have misunderstood something, but i just can't figure out why this code doesn't work as expected.
The code is fully working as expected:
if(sm.Timeout(1000)) {
Serial.println("t1");
sm.Set(s2h,s2b); // here you leave the current state and switch to another state
}
After the 1000ms timeout is reached, you set a different state in the state machine.
So you NEVER arrive at the 2000ms timeout in that state:
_1_1_SMTEST:72: error: 'RoboStartState' was not declared in this scope
SM RoboGo(RoboStartState);//create simple statemachine
^
exit status 1
'RoboStartState' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
-----------------( END COPY )----------------------
The failure is on the line with the initial creation of the state machine...
WHO is the author of SM ? I can't find that anywhere..
Any suggestions appreciated! I have lots of Robot Kits out there that use SM !
But it seems like the author had not posted for several months now.
He also seems to be no update-junky, as his latest forum entry was about Arduino-IDE crashing when using Windows XP (XP was released in 2001 and Microsoft support lifecycle for XP ended in April 2014).
In case that he is not able to provide a future update for his library: His library is just a few lines of code and it should be not too hard to debug any problem with updated IDE versions, I think.
It's baffling to me, as I am teaching a workshop where we have used this same code on over a dozen robots with great success, but this error just started popping up. Did a recent change to the Arduino IDE affect this?