How to get variable from another cog
Don M
Posts: 1,652
in Propeller 1
Lets say I have some methods running in a cog. In that cog I have a byte variable called poll.
Now in my main cog I want to get the value of of "poll". Is there a simple way of doing this? Do I use the @ sign somehow?
Thanks.
Now in my main cog I want to get the value of of "poll". Is there a simple way of doing this? Do I use the @ sign somehow?
Thanks.
Comments
The parent object calls this each time it wants to know the value of poll.
In this case the parent object just needs to call this method once:
When the parent object wants to know what the value of poll is it uses:
Let's say the parent wants to take some action when poll equals two. It would use code like this: