Skip to content

Multicore: Triggering functions to run on Core1 from Core0 #2321

Discussion options

You must be logged in to vote

Try making your global state variables volatile and polling them in loop1 and do whatever is appropriate in loop1. Something like this:

...
volatile int volcnt;
...
void loop1() {
   int lastVolCnt;
    ....
   if (lastVolCnt != volCnt) {
        lastVolCnt = volCnt;
        ... change volume, make lights blink, etc ...
    }
    ....
}

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by Jediknite1101
Comment options

You must be logged in to vote
1 reply
@earlephilhower
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants