Hi everyone, I'm facing a problem with data exchange between a sketch and a python script.
The sketch I'm using is this
#include <Bridge.h>
#include <Process.h>
void setup() {
Bridge.begin();
Process p;
p.runShellCommandAsynchronously("python /home/code/main.py"); // run the python script
}
void loop() {
char data[200];
Bridge.get("data", data, 200); //get latest parsed data
}
and the python script is approximately this
sys.path.insert(0, '/usr/lib/python2.7/bridge/')
import json
from bridgeclient import BridgeClient as bridgeclient
client = bridgeclient()
value = 'test'
client.put('data', value)
when I run this, the AVR receives an empty string.
If I remove the "runShellCommandAsynchronously" call from the sketch and start the python script manually in ssh, it works fine!