antonvh / PUPRemote

GNU General Public License v3.0
2 stars 2 forks source link

call() to replace read and write. #7

Closed antonvh closed 1 year ago

antonvh commented 1 year ago

We can just 'call' the sensor, I think. Instead of read/write.

Then we can set the mode if needed, and return data when needed. All abstracted away.

so p.call('set_mode', 1)

and r,g,b = p.call('get_color')

https://github.com/antonvh/PUPRemote/blob/bf360020e9d47dcc9672a2e383b8f1b2f04c8b3b/PUPRemote/pupremote.py#L124