14 lines
243 B
Python
14 lines
243 B
Python
import websocket
|
|
import json
|
|
import ssl
|
|
|
|
websocket.enableTrace(True)
|
|
|
|
ws = websocket.create_connection(
|
|
"wss://localhost:3000",
|
|
sslopt={"cert_reqs": ssl.CERT_NONE}
|
|
)
|
|
|
|
ws.send(json.dumps({"type": "gcode", "cmd": "G0 x104"}))
|
|
|
|
ws.close() |