ArminJo / Arduino-BlueDisplay

Arduino library for the BlueDisplay App. The App converts your smartphone into an Android remote touch display.
GNU General Public License v3.0
45 stars 9 forks source link

webusb/websocket/firmata #14

Closed pmp-p closed 1 year ago

pmp-p commented 1 year ago

Hi, i'm author of pygbag/https://pygame-web.github.io and i recently tried experimenting in parallel with bluedisplay, webusb(serial), telemetrix ( an enhanced FirmataPlus ). And i've come to a crossroad : is it possible to merge telemetrix and still have bluedisplay protocol as a side channel ? especially on esp8266/32 where there's a lot available left.

That way serial / socket / websocket could work at once with the same library (eg bluedisplay-web). by documenting the protocol it would be possible to build the same widgets found on android in webpages with pygame/harfang.

I'm willing to add websocket streaming support where it is required. to the point of being able to control real hardware from a webpage like this kind https://www.youtube.com/watch?v=AOGFXxhKGWw&t=89s

ArminJo commented 1 year ago

Hi, it sound interesting, but I doubt, that I got the idea. Teelemetrix is to remote control your Arduino hardware over a serial protocol. BlueDisplay is to remote control your Android GUI server BlueDispplay over serial by the program running on the arduino. (And you can use a local display too). So what is the use case of merging? I have no clue 😞. Please help.

pmp-p commented 1 year ago

The point of merging is having a two way interaction with complex devices. first on boot, via BlueDisplay the device provides its sensors panels ( with self documenting labels ) and maybe basic controls. and maybe document the RPC ( like simpleserial does on startup https://simplerpc.readthedocs.io/en/latest/ )

Then after understanding the BlueDisplay controls and how values change, with telemetrix the student begin to write more elaborated controls in python and send them to device for execution .

When the new control are good. the student can convert python code to C++ and program the routine+new bluedisplay widget directly on device.

Also i think BlueDIsplay is more attractive for a first approach than a datasheet. The point of using websocket is that the device can stay in a camera equipped lab and the student remote with only a webbrowser for requirements.