Skip to content

kennedn/pico-ws-uart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pico-ws-uart

A WebSocket to UART bridge on the PicoW. Permits serial communication with a device over WebSocket.

Building

Clone repository and cd

git clone https://github.com/kennedn/pico-ws-uart.git
cd pico-ws-uart

Make build folder and cd

mkdir build
cd build

Run cmake

cmake .. -DWIFI_SSID="YOUR_WIFI_SSID" -DWIFI_PASSWORD="YOU_WIFI_PASSWORD"

Compile the application

cd app
make -j 4

Usage

By default the uart config is UART_0 with tx = GP0 and rx = GP1.

NOTE: UART configuration and Debug information can be configured in the apps CMakeLists.txt

When the device receives a message from a client, it will echo it on the tx pin. When UART data is received on the rx pin, it will be sent as a message to all connected WebSocket clients.

Client connections to the server that do not request a WebSocket upgrade (e.g Web Browsers) will be served a static HTML webpage that allows basic interaction with the websocket:

Thanks

Thanks to cadouthat for the amazing pico-ws-server library.

About

WebSocket <--> UART

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 70.8%
  • HTML 10.0%
  • CMake 9.6%
  • C 9.6%