I am looking to have my OpenMV microcontroller send JSONs quite often to the raspberry pi, but in a queue format. Where the JSONs would build up a stack and the Rasberry PI would read each one, one by one as their being added on to the stack consistently. I tried achieving this using USB.send, but ran into issues, as the raspberry pi has to ask the OpenMV cam by writing a to the serial to receive a JSON, but this defeats the stacking process I am trying to achieve. What’s the best way to do this through USB.
In whole, I want to have the raspberry pi always listening and as something comes in, it processes the json and if others come in while it’s processing the current JSON they build up a stack, that it pulls from after.