Switching on a cog - once!
John A. Zoidberg
Posts: 514
Hello there,
I've a bit of problem with enabling a cog, which is shown in the code space below:
However, the program works, but it didn't initialize the cog once, but a lot of times according to the loop, causing the system to stutter.
How can I turn the cog on once, and latch it? I know it could be a basic programming question, but I couldn't figure this one out.
I've a bit of problem with enabling a cog, which is shown in the code space below:
some program loop here: repeat |-- ... |-- ... |-- IF (alarm) |-- coginit(3, anotherCog, @stack3) |-- ...
However, the program works, but it didn't initialize the cog once, but a lot of times according to the loop, causing the system to stutter.
How can I turn the cog on once, and latch it? I know it could be a basic programming question, but I couldn't figure this one out.
Comments
Generally using coginit is frowned upon.