mwebsocket

Simple to use implementation of WebSockets for microcontrollers.
ORIGINAL POST
By skaarj1989
components
Hardware Components
Arduino Uno
X 1
W5100 Ethernet shield
X 1
W5500 Ethernet shield
X 1
Arduino Mega2560
X 1
details

websocket_2.JPG

List of supported IDEs:

List of supported MCUs:

  • ATmega328P
  • ATmega2560
  • SAMD21 (ARM Cortex-M0+)
  • STM32 (ARM Cortex-M)
  • ESP8266
  • ESP32-WROOM-32D

WebSocketServer compatible browsers:

  • Chrome
  • Edge
  • Firefox
  • Opera

 

Requirements

  • Development board (confirmed working, other boards may or may not work):
    • Arduino Uno (ATmega328P)
    • Arduino Pro Mini (ATmega328P)
    • Arduino Mega2560
    • Arduino Zero / SAMD21 M0 (ARM Cortex-M0)
    • STM Nucleo-64 (ARM Cortex-M)
    • WeMos D1 mini (ESP8266)
    • NodeMCU v3 (ESP8266)
    • ESPDUINO-32 (ESP32-WROOM-32D)
  • Ethernet module or shield (confirmed working):
    • Arduino Ethernet Shield (W5100)
    • Arduino Ethernet Shield 2 (W5500)
    • WizNet W5500 module

Chat

Node.js server on Raspberry Pi (/node.js/chat.js)

Browser client (/node.js/chat-client.htm)

Arduino Uno client (/examples/chat/chat.ino)

Approx memory usage

simple-client.ino example (without debug output, 128 bytes data buffer)

Ethernet.h (W5100 and W5500)

BoardProgram spaceDynamic memory
Arduino Uno24 648 bytes (76%)829 bytes (40%)
Arduino Mega256025 640 bytes (10%)857 bytes (10%)
Arduino Pro Mini24 648 bytes (80%)829 bytes (40%)
Arduino Zero30 596 bytes (11%)3 056 bytes (9%)

websocket_2.JPG

List of supported IDEs:

List of supported MCUs:

  • ATmega328P
  • ATmega2560
  • SAMD21 (ARM Cortex-M0+)
  • STM32 (ARM Cortex-M)
  • ESP8266
  • ESP32-WROOM-32D

WebSocketServer compatible browsers:

  • Chrome
  • Edge
  • Firefox
  • Opera

 

Requirements

  • Development board (confirmed working, other boards may or may not work):
    • Arduino Uno (ATmega328P)
    • Arduino Pro Mini (ATmega328P)
    • Arduino Mega2560
    • Arduino Zero / SAMD21 M0 (ARM Cortex-M0)
    • STM Nucleo-64 (ARM Cortex-M)
    • WeMos D1 mini (ESP8266)
    • NodeMCU v3 (ESP8266)
    • ESPDUINO-32 (ESP32-WROOM-32D)
  • Ethernet module or shield (confirmed working):
    • Arduino Ethernet Shield (W5100)
    • Arduino Ethernet Shield 2 (W5500)
    • WizNet W5500 module

Chat

Node.js server on Raspberry Pi (/node.js/chat.js)

Browser client (/node.js/chat-client.htm)

Arduino Uno client (/examples/chat/chat.ino)

Approx memory usage

simple-client.ino example (without debug output, 128 bytes data buffer)

Ethernet.h (W5100 and W5500)

BoardProgram spaceDynamic memory
Arduino Uno24 648 bytes (76%)829 bytes (40%)
Arduino Mega256025 640 bytes (10%)857 bytes (10%)
Arduino Pro Mini24 648 bytes (80%)829 bytes (40%)
Arduino Zero30 596 bytes (11%)3 056 bytes (9%)
documents
Code
Github

COMMENTS

Please Login to comment
  Subscribe  
Notify of