This is a very simplified IO class. It is meant to be used over the particle cloud using the default Tinker sketch that ships on the device.
For a full-featured IO class you should be using particle-io
In order to use the tinker-io library, you will need to use the default Tinker sketch.
The host computer (where you're running your Node.js or Web application) and the Particle do NOT have to be on the same local network.
Blink an Led
The "Hello World" of microcontroller programming:
var TinkerIO = ;var board =token: YOUR_PARTICLE_TOKEN// optional - you can use your username/password instead of token// username: YOUR_PARTICLE_USERNAME_EMAIL,// password: YOUR_PARTICLE_PASSWORD,deviceName: YOUR_DEVICE_NAME;board;
Johnny-Five IO Plugin
var five = ;var TinkerIO = ;var board =io:token: YOUR_PARTICLE_TOKENdeviceId: YOUR_PARTICLE_DEVICE_ID;board;