theHuanter 04/09/2024 03:18 PMI have two container. One is triggered by 4 GPIO Pins if they are driven LOW. And one container which is triggered when one GPIO is driven HIGH.
First of all: I think this is not possible at all. I can not have gpio high and low mixed as trigger. But besides that I receive a message in the log telling me:
[artemis.containers] INFO: triggered by pin {name: trigger, id: b9906bd7-9c7e-dce1-9a10-4ab91b230523, pin: 7, level: 0}
but if I check the esp32.ext1-wakeup-status
and extract the pin which actually triggered this container to run I get 9 instead of 7.
9 is supposed to be the GPIO which starts a container when driven HIGH and it became LOW (thats why I assume it is not possible to have both setup).
There is an option with "any high" or "any low" and I think it can only be that any of the GPIOs are low or any of the declared once are HIGH but not both.
So - this is causing lots of chaos in my code now and I wonder if I can fix that somehow. Or if this is even fixable somehow anyway. I am using artemis right now with a container declaration like so:
containers:
trigger:
entrypoint: "../src/trigger.toit"
triggers:
- gpio:
- pin: 6
level: "low"
- pin: 7
level: "low"
- pin: 18
level: "low"
- pin: 21
level: "low"
ble:
entrypoint: "../src/ble/ble.toit"
triggers:
- gpio:
- pin: 9
level: "high"
I think the only option I have here is to always only run one container which then checks the cause and the pin numbers and also checkts the Pins and then runs the dedicated containers on there own. Is this possible?
Can I skip artemis from running the container and leave it to me, when to run them? (I assume not)