Below is my apps block code:
Is there any missing block?
When I'm creating the same function using HTML code, it is successful.
Below is my code in HTML.
var url = "https://api.spark.io/v1/devices/" + deviceID + "/volts";function callback(data, status){if (status == "success") {volts = parseFloat(data.result);volts = volts.toFixed(2);g.refresh(volts);setTimeout(getReading, 1000);}else {alert("There was a problem");}}function getReading(){$.get(url, {access_token: accessToken}, callback);}</script>
int reading = 0;double volts = 0.0;int analogPin = A0;void setup() {Spark.variable("analog", &reading, INT);Spark.variable("volts", &volts, DOUBLE);}void loop() {reading = analogRead(analogPin);volts = reading * 3.3 / 4096.0;}
Don't you think I have put the access token?