Go Down

Topic: SCoop - multitask and Simple COOPerative scheduler AVR & ARM (Read 31315 times) previous topic - next topic

I'm confused. If I run this code in a "normal" loop, it prints the value:

void loop()
{

    String s1 = "abcde";
    Serial.println(s1);
}

But within the SCoop loop it fails (doesn't print anything):
void mytask::loop()
{
    String s1 = "abcde";
    Serial.println(s1);
}

jimford

Have you got a 'yield' somewhere in your main loop, such that processing is handed over to your 'mytask'?

Jim

moe69

hi fabriceo,

i´m looking for an easy and simple multitask/scheduler to get my project working.

These are the basic tasks i want to run:

- Pushbutton (short press/long press = Timer?)
- Write Serial (Bluetooth / Event based)
- Read Serial (Bluetooth / Event based)
- Update Display (Time or Event based)

I looked into your wiki and the tutorial to understand your scheduler.
Do you think it is possible to use SCoop with my project. I got only a  bit of expirience in programming, so your tutorial is not easy to read.
But if it is possible to ask you some questions if i got stuck in coding, then i will give SCoo a try.

I put a blog about my project online. If you want to have a look:
http://arduwin.blogspot.de/

Thx for your help!

Hi all,

Really good stuff, SCoop! Thanks for the work!
I would like to use SCoop with Teensy 3.1 but it looks like this doesn't work. I can compile example sketches up to Teensy 3.0 without problems, but as soon as I choose Teensy 3.1 I will get plenty of errors...

Is there somebody around using SCoop already with Teensy 3.1?

Thanks,
Regards,
Mike

Code: [Select]

Compiling 'Scheduler' for 'Teensy 3.1'
PoolControl.ino:In file included from
SCoop.h:79:2: error: #error "this library might not be compatible with this NON-AVR \ ARM platform. Please experiment and report on Arduino.cc forum"
SCoop.h:141:28: error: variable or field 'sleep' declared void
SCoop.h:141:28: error: 'SCDelay_t' was not declared in this scope
SCoop.h:247:24: error: expected ')' before 'reload'
SCoop.h:249:3: error: 'SCDelay_t' does not name a type
SCoop.h:250:3: error: 'SCDelay_t' does not name a type
SCoop.h:257:3: error: 'SCDelay_t' does not name a type
SCoop.h:260:3: error: 'SCDelay_t' does not name a type
SCoop.h:263:3: error: 'SCDelay_t' does not name a type
SCoop.h:265:3: error: 'SCDelay_t' does not name a type
SCoop.h:269:12: error: expected type-specifier before 'SCDelay_t'
SCoop.h:272:3: error: 'SCDelay_t' does not name a type
SCoop.h:272:3: error: ISO C++ forbids declaration of 'rhs' with no type [-fpermissive]
SCoop.h:277:33: error: 'SCDelay_t' does not name a type
SCoop.h:277:43: error: ISO C++ forbids declaration of 'rhs' with no type [-fpermissive]
SCoop.h:280:33: error: 'SCDelay_t' does not name a type
SCoop.h:280:43: error: ISO C++ forbids declaration of 'rhs' with no type [-fpermissive]
SCoop.h:283:3: error: 'SCDelay_t' does not name a type
SCoop.h:285:3: error: 'SCDelay_t' does not name a type
SCoop.h:In member function 'SCoopDelay& SCoopDelay::operator=(int)'
SCoop.h:272:3: error: 'set' was not declared in this scope
SCoop.h:In member function 'SCoopDelay& SCoopDelay::operator=(const SCoopDelay&)'
SCoop.h:275:5: error: 'timeValue' was not declared in this scope
SCoop.h:275:19: error: 'const class SCoopDelay' has no member named 'timeValue'
SCoop.h:In member function 'SCoopDelay& SCoopDelay::operator+=(int)'
SCoop.h:278:12: error: 'add' was not declared in this scope
SCoop.h:In member function 'SCoopDelay& SCoopDelay::operator-=(int)'
SCoop.h:281:12: error: 'sub' was not declared in this scope
SCoop.h:At global scope
SCoop.h:295:25: error: expected ')' before 'reload'
SCoop.h:297:3: error: 'micros_t' does not name a type
SCoop.h:298:3: error: 'micros_t' does not name a type
SCoop.h:305:3: error: 'micros_t' does not name a type
SCoop.h:308:3: error: 'micros_t' does not name a type
SCoop.h:311:3: error: 'micros_t' does not name a type
SCoop.h:313:3: error: 'micros_t' does not name a type
SCoop.h:317:12: error: expected type-specifier before 'micros_t'
SCoop.h:320:3: error: 'micros_t' does not name a type
SCoop.h:320:3: error: ISO C++ forbids declaration of 'rhs' with no type [-fpermissive]
SCoop.h:325:35: error: 'micros_t' does not name a type
SCoop.h:325:44: error: ISO C++ forbids declaration of 'rhs' with no type [-fpermissive]
SCoop.h:328:35: error: 'micros_t' does not name a type
SCoop.h:328:44: error: ISO C++ forbids declaration of 'rhs' with no type [-fpermissive]
SCoop.h:332:3: error: 'micros_t' does not name a type
<--- snip too much errors... --->

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy