Run Karel prog from macro command screen.

  • I'd like to run karel prog, but I want it to be started using DI of F, as a macro (defined in Macro command sreen).

    Everything is fine since my DI comes - system forces me to turn off the TP, but I want to run it with TP = ON (manual mode).

    Maybe it's a problem with motion groups? In my karel prog I do have %NOLOCKGROUP but do I need something else?

    Could you please suggest me something how to solve it?

  • I think your only option is to run that Karel program at startup and have a continuous loop, just like a BG logic program, but with a time delay so it doesn't bog down the cpu.


    Then in each loop check if the signal is on to decide if you run your logic. Use one shot logic to trigger it only once.



    In psuedocode:



    While true

    If trigger = on and running = off then

    Do stuff

    End if

    Running = trigger


    Time delay

    End while

  • I think your only option is to run that Karel program at startup and have a continuous loop, just like a BG logic program, but with a time delay so it doesn't bog down the cpu.

    Heh... I thought about it, but this is just what I wanted to avoid to use :frowning_face:

    But maybe there's no other way...

Advertising from our partners