====== Websocket ====== SocketIO is a cross-browser Javascript library that abstracts the client application from the actual transport protocol. For modern browsers the WebSocket protocol is used, but for older browsers that don't have WebSocket SocketIO emulates the connection using one of the older solutions, the best one available for each given client. The important fact is that in all cases the application uses the same interface, the different transport mechanisms are abstracted behind a common API, so using SocketIO you can be pretty much sure that any browser out there will be able to connect to your application, and that for every browser the most efficient method available will be used. * **[[https://www.fullstackpython.com/websockets.html|Good overview & list of software options]]** * [[https://skillsmatter.com/skillscasts/13126-inspire-creation-with-technology-such-as-the-raspberry-pi-over-a-pint|Video exposition (10m)]] Installation of Flask-SocketIO is very simple: * [[https://blog.miguelgrinberg.com/post/easy-websockets-with-flask-and-gevent/page/17|Using Flask with websockets ]] and Raspberry-pi === websocketd === websocketd is a small command-line tool that will wrap an existing command-line interface program, and allow it to be accessed via a WebSocket. * [[https://github.com/joewalnes/websocketd|websocketd git]] Example code for [[https://www.appropedia.org/Free_and_open-source_automated_3-D_microscope|3D Microscope:]] #!/usr/bin/python3 import websocketd p = websocketd.RPC('host.with.franklin:8000', tls = False) for y in range(10): for x in range(10): p.line_cb((x, y)) # Insert code for taking a picture here. === Mozilla Iot Gateway + Webofthings=== Monitor and control all your smart home devices via a unified web interface. * [[https://github.com/mozilla-iot/docs|Mozilla-iot Docs on Github]] * [[https://iot.mozilla.org/gateway/Mozilla Iot gateway]] * [[https://webofthings.org/|WebOfThings Oganisation]] === Marker Tracking (Position Sensing) === Track robots with an object recognition algorithm - save the time of training an appropriate system and rather stick markers to our robots. , OpenCV, comes with an easy-to-use marker detection framework called Aruco. Also, OpenCV includes a Python binding [[https://dzone.com/articles/marker-tracking-via-websockets-with-raspberry-pi|source...]]