• Input State remains the same

    Official API - Evok neuron pi l203 evok api input
    2
    0 Votes
    2 Posts
    2k Views
    T
    @HarishKumar The evok itself is not designed to handle the logic of your application. That's why we call it API. It is using Tornado which means the server itself runs in one loop so you need to have all the program behavior ready before it is called mainLoop.start(). So if you run an infinite loop anywhere in evok, you stop everything else (reading, setting, all APIs, ...). So I suggest using that APIs, it is much more easier to implement and you have the same functionality. But if you would REALLY want to do it in evok, you would have to prepare your program in a function, all tasks that would take more time would have to be decorated as coroutines and the call has to be yielded in order not to stop the main loop. The logic behind this is a little bit complicated to describe in one post :)
  • 0 Votes
    2 Posts
    3k Views
    T
    @HarishKumar That is the point of the API to allow you to controll the IOs of with a simple python script so you do not need to write the low level programs... But if you do not want to use websockets or http, you can use the TCP Modbus. Evok: https://github.com/UniPiTechnology/evok#testing-latest-git-versions TCP Modbus (already included in evok): https://github.com/UniPiTechnology/neuron_tcp_modbus_overlay