No values seen in IoT cloud

The value can be displaied in the serial monitor, but can't display in the Value widget in dashborad. Need help, please!!!!!!!!!!

<iframe src=https://create.arduino.cc/editor/tiancai529/5cbda419-d9bd-4815-8768-93253cf703a8/preview?embed style="height:510px;width:100%;margin:10px 0" frameborder=0></iframe>

After reading the value from potPin, you should assign it to your cloud variable test.

Like:

int val = analogRead(potPin);
test = val;

That should do the trick.

OMG, it works!!!!! Thank you soooo much. So does it mean that I should use "test " in each skectch, if I want to see the data in widgets?

Here test is the name you chose for that int variable.

You can add other variables, like humidity, temperature etc, and as soon as you read a value from a sensor, and assign it to on of said variables, the dashboard will be updated right away.

Thanks for your reply.
Can you explain more about the "assign" step?
You said "test" is a name, so it could be changed to any words, but I didn't declare this "test" before, why can I use it?

"assign" here has just the common meaning of all programming languages.
I mean, something you write in your code, like in
test = 1;

Regarding test, it's just the name you chose when you created the variable.

Please check section 5 on the Arduino Cloud site about how to create variables.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.