-
Notifications
You must be signed in to change notification settings - Fork 0
Websocket from vscode vex extention #32
Copy link
Copy link
Open
Labels
difficulty-04-RanchoHeadYour daring to do this? Geese...Your daring to do this? Geese...enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
difficulty-04-RanchoHeadYour daring to do this? Geese...Your daring to do this? Geese...enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Projects
- StatusShow more project fieldsTodo
The websocket server allows you open a websocket connection to the User Port when a brain or controller is detected and selected by the VEX Extension. You could use it to stream data from your robot to a webpage. Any data you send to the interactive terminal, using printf() for example, gets forwarded to the websocket. But you must have a usb connection between either a brain or controller and your computer.
The data flow through the VEX Extension look like this.
(VEX User Port) Serial Port Connection → Websocket Server → Websocket Client
I don’t modify the data in any way, so what you send to the user port is what the Websocket will receive.
In ts you could do the following to create a websocket connection:
// CONFIG
const PORT = '7071';
const IP = 'localhost';
const deviceUrl = `ws://${IP}:${PORT}/vexrobotics.vexcode/device
let webSocket = new WebSocket(deviceUrl);
websocket should be written in python. The data should be read from the function of the motor checks, temps, etc. But I will want more info, rpm, etc. This should also be saved onto a file if needed.