Skip to content

Error connecting to particle cloud #68

@karmakazi

Description

@karmakazi

I'm using a photon.

This is the error:

Error: Unable to connect to particle cloud.: code: 404 undefined
at IncomingMessage. (/Volumes/Lychee/Users/andrewh/Development/node/node_modules/particle-io/lib/particle.js:346:19)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:919:16
at process._tickCallback (node.js:419:13)

I'm using your sample code:

var Particle = require("particle-io");
console.log("Token = " + process.env.PARTICLE_TOKEN);
console.log("Device ID = " + process.env.PARTICLE_DEVICE_ID);

var board = new Particle({
token: process.env.PARTICLE_TOKEN,
deviceId: process.env.PARTICLE_DEVICE_ID
});

board.on("ready", function() {
console.log("CONNECTED");
this.pinMode("D7", this.MODES.OUTPUT);

var byte = 0;

// This will "blink" the on board led
setInterval(function() {
this.digitalWrite("D7", (byte ^= 1));
}.bind(this), 500);
});

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions