I’ve updated both leOS and leOS2 with the ability to add a task that has to be executed once it has been added to the scheduler.
This is possible by specifying the SCHEDULED_IMMEDIATESTART keywork for the status of the task.
Here’s an example:
myOS.addTask(myFunction, interval, SCHEDULED_IMMEDIATESTART);
Previously, the task would be executed the first time only after the interval has expired.
The new feature is available in leOS 1.0.3 and leOS2 2.1.1, that you can download from this page.
Hello..
I have downloaded the latest version of LeOS and followed the instructions given in the README file. I am using an ATmegaa32 chip using ARDUINO 1.0 IDE on linux system. I have not been able to compile the included example codes. The compiler throws up the following error:
/home/architect/arduino-1.0/libraries/leOS2/leOS2.cpp: In function ‘void WDT_vect()’:
/home/architect/arduino-1.0/libraries/leOS2/leOS2.cpp:253:32: error: ‘WDIE’ was not declared in this scope
/home/architect/arduino-1.0/libraries/leOS2/leOS2.cpp: In member function ‘void leOS2::setWDT()’:
/home/architect/arduino-1.0/libraries/leOS2/leOS2.cpp:330:23: error: ‘WDIE’ was not declared in this scope
Can you direct me to resolve this issue.
P.S. All other arduino codes have been working well using the ATmega32 chip though its not officially supported.
That’s my fault. I couldn’t check every datasheet from Atmel so I only checked the most relevant ones, the ones that could refer to Arduino. I didn’t check the Atmega32 so I didn’t verify if this chip had a WDT that supported both internet and reset signals. The Atmega32 doesn’t support the interrupt rising for the WDT overflow so leOS2 won’t run on that chip.
Thanks for the clarifications.
Can you give out any hints to modify the code to be used with mega32 ?
Uhm… leOS2 is based on a specific mechanism: it uses the WatchDog to generate an interrupt, that is catched by a specific ISR. If there’s no ability to raise an interrupt signal by the MCU, there’s no possibility to use the leOS2 library. You could try to modify the leOS v.1 library to adapt it to work on the Mega32. Of course, leOS1 is a little bit different than leOS2 in its way of operation.
Ok..Maybe I can give it a try. Thanks again !