Hello,
I am working on a project after a long time and I have a strange problem that I can't seem to solve.
I have a Python application on a raspberry Pi that needs to do something and return some information back.
There is a small application in B4J that processes and displays this. I call the Python program via jShell, which works normally. However, I don't get any information back from the Python program. When I run the py file in the terminal it returns the information normally and closes the file, I assume that everything is OK in this part because the information is correct.
What am I doing wrong to not see this information in StdOut.
B4J code:
The returned data should look something like this:
Velocity max: 1000
Raw bytes acceleration: [232, 3, 0, 0]
....
Maybe the solution is simple, I just don't see it.
THANK YOU
I am working on a project after a long time and I have a strange problem that I can't seem to solve.
I have a Python application on a raspberry Pi that needs to do something and return some information back.
There is a small application in B4J that processes and displays this. I call the Python program via jShell, which works normally. However, I don't get any information back from the Python program. When I run the py file in the terminal it returns the information normally and closes the file, I assume that everything is OK in this part because the information is correct.
What am I doing wrong to not see this information in StdOut.
B4J code:
Example:
Dim sh As Shell
sh.Initialize("sh", "python3", Array As String("test.py", "1000", "1000", "1000", "1000"))
sh.WorkingDirectory = "/home/pi/motor1/"
sh.Run(-1) 'set a timeout of 10 seconds
Wait For (sh) sh_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
Log(StdOut)
The returned data should look something like this:
Velocity max: 1000
Raw bytes acceleration: [232, 3, 0, 0]
....
Maybe the solution is simple, I just don't see it.
THANK YOU