considering: https://github.com/dmichel76/ViSi-Genie-RaspPi-Library
I've tried a serial read and a write, from raspbian to 4d panel, and it all worked fine.
I 'm trying to use a slider controller, this way it work for one minute then goes down returning -1 at read.
import geniePi as D
import wiringpi2 as W
W.wiringPiSetup()
D.genieSetup("/dev/ttyAMA0", 115200)
while 1:
a = D.genieReadObj(32,0)
print ("a:" % (a))
I'm looking at genieGetReply to solve this issue(to avoid the use of ReadObj):
But looking at swig files seems like genieReplyAvail is always considered as 0, am I right?
SWIGINTERN PyObject *_wrap_genieReplyAvail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
int result;
So genieGetReply() isn't called. It appear that to use genieGetReply() I must create a class of the struct genieReplyStruct.
x =D.genieReplyStruct()
D.genieGetReply(x)
(if geniReplyAvail never get other value than 0 so this stay forever in the delay(1) statement)
I cannot understand how this should be implemented and called, so I kindly ask you a little advice.