Originally posted by spud
View Post
There is no way you would want to do the actual I2C or other protocols but let the existing drivers written by the supplier do it most of these are written in either shell script or python.My idea would be a general interface protocol for doing strings reads/writes, integer reads/writes and bit reads/writes. So all you have to do is the basic transport then let the user write the final shell script that interfaces between you and the device driver
All shell scripts would follow a fixed set of rules and be named in a consistent way similar the way plugins are named. They would also return data in a consistent manner. So once the protocol is written the rest is up to the script to get and receive that data from the hardware.
Bit data would look exactly as it does now, integer data, such as to and from an A2D or D2A would be much like a dimmer. And string data would be kinda like sending PushOver or Mail messages.
It would be good to write a couple of interface scripts for Adafruit and Pimoroni must useful devices. I'd be willing to write the script for Pimoroni Automation pHAT and the Adafruit i2c / SPI character LCD backpack which can control the 16x2 and 20x4 displays.
Actually this wouldn't have to be just for the Pie, it could be a way to interface lots of things between HS3 and Unix like system that supports mono on any platform.
This needs some more fleshing out but I don't think there isn't much too it since it's the user supplied script that is responsible to actually get the data to the device. I'd be more than happy to be a sounding board working on the basic protocol if you thing this would be useful.
Just my musing on the subject.
Leave a comment: