WebSocket bluetooth serve
通过 Node server 搜索和连接蓝牙设备,并将获取到的蓝牙数据通过 WebSocket 发送出去。
npm install
node start
网页建立 WebSocket 连接,请求地址 http:localhost:8001
http-server
打开 localhost:8080
,点击「连接」
若遇到 [Error: Cannot connect]
,可尝试重启 mindwave
本项目用到:
- node-bluetooth,Bluetooth serial port communication for Node.js.
- ws, a Node.js WebSocket library.