custom-rss icon indicating copy to clipboard operation
custom-rss copied to clipboard

test.cpp does not work

Open andrewmcgivery opened this issue 9 years ago • 0 comments

In build.particle.io, I created a new app from the example test.cpp file. When I click Verify, I am presented with the following errors:

image

Code I am using:

// This #include statement was automatically added by the Particle IDE.
#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!");
}

andrewmcgivery avatar Apr 05 '16 01:04 andrewmcgivery