kihtrak
Hello there, 
May I know how to connect a smartphone, which has been pre-loaded with sensors like gyroscope etc ? Once after doing it, would we able to operate on those sensors using OpenPLC? 
I believe this might involve lot of background work, but if it's possible am ready to take the effort. Kindly guide me through the process. 
Reply 0 0
thiagoralves
OpenPLC was not designed to connect to devices like smartphones. Of course it can be done but it would require writing a new driver (hardware_layer) for OpenPLC
Reply 0 0
kihtrak
Please correct me if am wrong. 
So, will the driver for OpenPLC act as a "device driver" that connects the rPI to the Smartphone (since OpenPLC functions on top of rPI) or it needs to be configured in some particular way so that OpenPLC interacts with it? 
If possible, could you please let me know the steps/logic behind this? I can take it from there. 
Reply 0 0
thiagoralves
Yes, that's exactly what it is. You can check how OpenPLC drivers are built by looking inside the /core/hardware_layers folder. There you will find all the drivers for each platform supported by OpenPLC. Start by looking at the blank driver, which is a skeleton to write a new driver. Basically, the driver must have 3 function calls. One to initialize the hardware, one to read the inputs and another to write to outputs. You can put your code there to read data from smartphone sensors and then update OpenPLC buffers with the data you read.
Reply 0 0
Reply