The values collect from the sensor was not show on dashboard live

/*
  Sketch generated by the Arduino IoT Cloud Thing "Untitled"
  https://create.arduino.cc/cloud/things/5cbc04df-d5fd-4188-a730-0d86f3adf5ea

  Arduino IoT Cloud Variables description

  The following variables are automatically generated and updated when changes are made to the Thing

  float realTimeStorage;
  float storageLevel;
  bool actuatorStatus;
  bool truckDetection;

  Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
  which are called when their values are changed from the Dashboard.
  These functions are generated with the Thing and added at the end of this sketch.
*/

#include "thingProperties.h"
#include "Adafruit_VL53L0X.h"
// Alarm
const int buzzer = 14; //D5

// truck detection
const int trigPin = 15; //D8
const int echoPin = 13; //D7

// display status
const int redLight = 2; //D4
const int greenLight = 0; //D3

// relay control actuator
const int relay1 = 16; //D0
const int relay2 = 12; //D6

// defines variables
long duration;
float distance;

double lvl;
double realLvl;

Adafruit_VL53L0X lox = Adafruit_VL53L0X();

void setup() {
  pinMode(buzzer, OUTPUT);
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  pinMode(redLight, OUTPUT);
  pinMode(greenLight, OUTPUT);
  pinMode(relay1, OUTPUT);
  pinMode(relay2, OUTPUT);

  // Initialize serial and wait for port to open:
  Serial.begin(115200);
  // This delay gives the chance to wait for a Serial Monitor without blocking if none is found
  delay(1500);

   // wait until serial port opens for native USB devices
  while (! Serial) {
    delay(1);
  }
  
  //  Serial.println("Adafruit VL53L0X test");
  if (!lox.begin()) {
    Serial.println(F("Failed to boot VL53L0X"));
    while(1);
  }
  
  // power 
  Serial.println(F("Chute is ready\n"));
  // Defined in thingProperties.h
  initProperties();

  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection, false);

  /*
     The following function allows you to obtain more information
     related to the state of network and IoT Cloud connection and errors
     the higher number the more granular information you’ll get.
     The default is 0 (only errors).
     Maximum is 4
  */
  setDebugMessageLevel(2);
  ArduinoCloud.printDebugInfo();

  digitalWrite(redLight, LOW);
  digitalWrite(greenLight, LOW);
  truckDetection = false;
  actuatorStatus = false;
    
  // keep the motor off by keeping both HIGH
  digitalWrite(relay1, HIGH); 
  digitalWrite(relay2, HIGH);
  delay(2000);
}

void loop() {
  ArduinoCloud.update();
  
  VL53L0X_RangingMeasurementData_t measure;
  lox.rangingTest(&measure, false); // pass in 'true' to get debug data printout!
  
  delay(100);
  Serial.println(measure.RangeMilliMeter);
  lvl = 100 - (100 * (measure.RangeMilliMeter))/206;
  storageLevel = constrain(lvl,0.0,100);

  realLvl = 1000 * lvl/80;
  realTimeStorage = constrain(realLvl,0.0,1000);
 
  if (storageLevel > 30)
  {
  digitalWrite(trigPin, LOW);           // Clears the trigPin
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);          // Sets the trigPin on HIGH state for 10 microseconds
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
  
  duration = pulseIn(echoPin, HIGH);    // Reads the echoPin, returns the sound wave travel time in microseconds
  distance = duration * 0.034 / 2;      // Calculating the distance
  
   if (distance > 7) {
      truckDetection = false;
      truckOff();
    }
  
    if (distance < 7 && distance > 3) {
      truckDetection = true;
      actuatorStatus = true;
      ArduinoCloud.update();
      truckOn();
    }
  }
  else{
  digitalWrite(redLight, HIGH);
  digitalWrite(greenLight, LOW);
  turnOFF();
  truckDetection = false;
  actuatorStatus = false;  
  }
}

void truckOn() {
  // Truck detected
  delay(2000);
  digitalWrite(redLight, HIGH);
  digitalWrite(greenLight, LOW);
  loadingProcess();
}

void truckOff() {
  noTone;
  turnOFF();
  digitalWrite(redLight, LOW);
  digitalWrite(greenLight, HIGH);
}

void loadingProcess(){
  actuatorPull();
  delay(3650);
  actuatorPush();
  ArduinoCloud.update();
  delay(3650);
  tone(buzzer, 1000, 3000);
  delay(5000);
}

/*
 * pushes the actuator
 */
void actuatorPush()
{
  digitalWrite(relay1, LOW);// turn relay 1 ON
  digitalWrite(relay2, HIGH);// turn relay 2 OFF  
}//actuatorPush()

/*
 * pull the actuator
 */
void actuatorPull()
{
  digitalWrite(relay1, HIGH);// turn relay 1 OFF
  digitalWrite(relay2, LOW);// turn relay 2 ON
}//actuatorPull()

/*
 * turnOFF the actuator
 */
void turnOFF()
{
  digitalWrite(relay1, HIGH);// turn relay 1 OFF
  digitalWrite(relay2, HIGH);// turn relay 2 OFF

}//turnOFF()

My code is working properly last February, but when I reopened it again, there is historical data that can be seen but does not show on the dashboard.

Hi @jovincyc0825. Please try this troubleshooting procedure and then then report back here with the results:


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


  1. Connect the Arduino board to your computer with a USB cable.
  2. If you are not already, log in to your Arduino account:
    https://login.arduino.cc/login
  3. Click the following link to open the list of your Arduino Cloud Things in the web browser:
    https://app.arduino.cc/things
  4. Click the name of the Thing.
    The "Setup" page for the Thing will open.
  5. Select the "Sketch" tab at the top of the page.
    The "Sketch" page for the Thing will open.
  6. Make sure the serial port of the Arduino board is selected on the sketch editor toolbar.
    Some Devices produce an "Over-the-Air" port and a serial port. In this case, there will be a menu on the toolbar that allows you to select either one. The serial port must be used for this procedure.
  7. Click the icon that looks like a magnifying glass ("Open Serial Monitor") on the sketch editor toolbar.
    A new browser window will open.
  8. Make sure the correct port is shown on the toolbar in the window.
  9. Select "115200 baud" from the menu at the bottom of the window.
  10. Press and release the reset button on the Arduino board.

You should now see information about the progress of the Thing initialization printed in the window.

If the board is able to connect to your Wi-Fi access point, you should see a message like this:

Connected to "some-ssid"

After that, if the board is able to connect through the Internet to the Arduino Cloud servers, you should see this message:

Connected to Arduino IoT Cloud

Was the Thing initialization successful as I described?

Hi, I have followed the procedure but nothing showed up on the desktop site but mobile app yes. No live update on desktop site.

I'm not sure I understood correctly what you mean by "nothing showed up on the desktop site". Please add a forum reply here that provides a more detailed description to help us to understand it.

Please provide the full and exact text of what "showed up" in the mobile app.

I'm not sure I understood correctly what you mean by "live update". Please add a forum reply here that provides a more detailed description to help us to understand it.

You will be much more likely to get effective assistance here if you make a stronger effort to communicate. Keep in mind that I can't see your computer or mobile device and I'm not psychic. The only information I have to work with is the information you provide here on the forum. I want to help, but if I don't have a good understanding of what is happening in your system then there is not much hope I will be able to accomplish that.


This is the desktop site dashboard Understand?
The thing 'showed up' is the scatter dots on the graph.
The values not showing in the graph but the data is recorded when I download the historical data.
And also the widgets like led, on off status, and percentage are not functioning as well

1 Like

There is currently a service outage of the Arduino Cloud IoT system:

I'll circle back here and post an update if I receive any news from the Arduino Cloud developers.

1 Like

Continuing the discussion from The values collect from the sensor was not show on dashboard live:

I think these issues look to be related.

Definitely.

Hi @jovincyc0825 ,

unfortunately, there was an issue with the Arduino systems, as reported by @ptillisch, which caused problems with the Things properties and the Dashboards. The issue has been solved now and everything should work as expected.

Could you please confirm?

Thanks

Hello,
I have an IoT Home Lights circuit. If I turn on a lamp in the dashboard, I also receive a notification in my messenger on the dashboard. Unfortunately, things keep going wrong for me.
I no longer receive any messages in my messenger.
No text will appear here, no matter what I turn on or off.
Every now and then several messages appear in succession in the messanger and my lights go on or off. Strange cloud behavior.
What's going on in the cloud?

Thanks
Bert

Hi @groothuisb

Does the problem still occur if you try it again now?

As mentioned above, there was a bug in the Arduino Cloud system around the time you made your post. That bug has since been fixed so if the problems you describe were related to the bug then we would expect that they won't occur now. If the problem is still occurring then it likely has a different origin, which we can try to investigate.

Things works fine now. But I have an issue connecting the device to the connection. I cannot to my phone hotspot, but I have changed the connection to 2.4GHz. For others devices, the console monitor show is connected then after few seconds the connection will terminated.
BUt works fine when connecting to home 2.4GHz wifi. So what is the issue? Am I require to buy a air router to connect the device>

Hello ptillisch,

Eveything is working fine now.
Thanks.

1 Like

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