Particle variable not registering!
When I run the following code:
int led = D0;
int photoresistor_right = A0;
int photoresistor_left = A1;
int analogvalue_right = 1;
int analogvalue_left = 1;
// Next we go into the setup function.
void setup() {
Particle.variable("analogvalue_right", &analogvalue_right, INT);
Particle.variable("analogvalue_left", &analogvalue_left, INT);
pinMode(photoresistor_right,INPUT);
pinMode(photoresistor_left, INPUT);
}
void loop() {
analogvalue_right = analogRead(photoresistor_right);
analogvalue_left = analogRead(photoresistor_left);
}
and access: https://api.particle.io/v1/devices/<device_id>/?access_token=<token>
I see the following json as if no variables were registered. what could be going on?
{
id: "<device id>",
name: "<device_name>",
connected: true,
variables: { },
functions: [ ],
cc3000_patch_version: "wl0: Nov 7 2014 16:03:45 version 5.90.230.12 FWID 01-303c9c9b",
product_id: 6,
last_heard: "2015-12-28T04:21:14.017Z",
status: "normal"
}