Skip to content

Websockets implementation for Spark Core, ported from Arduino WebSocketClient

License

Notifications You must be signed in to change notification settings

ekbduffy/spark_websockets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 

Repository files navigation

spark_websockets

Websockets implementation for Spark Core, ported from Arduino WebSocketClient

How to use :

#include Spark-Websockets/Spark-Websockets.h

WebSocketClient client;


void onMessage(WebSocketClient client, char* message) {
  Serial.print("Received: ");
  Serial.println(message);
}


/* This function is called once at start up ----------------------------------*/
void setup()
{
	Serial.begin(9600);
	while(!Serial.available()); // Wait here until the user presses ENTER in the Serial Terminal
	
	client.onMessage(onMessage);
	client.connect("echo.websocket.org");
}

void loop()
{
  client.monitor();
	delay(3000);
	client.send("Hello World!");
}

About

Websockets implementation for Spark Core, ported from Arduino WebSocketClient

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages