Hi there, I'm having some issue that my IOT Cloud not showing any output
#include "thingProperties.h"
const int forcePin = 14;
const int piezoPin = 27;
const int buzzerPin = 13;
const int threshold = 100;
int piezo;
int forceValue;
void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
delay(1500); // Wait for the Serial Monitor to open
// Defined in thingProperties.h
initProperties();
// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
setDebugMessageLevel(4);
ArduinoCloud.printDebugInfo();
pinMode(forcePin, INPUT);
pinMode(piezoPin, INPUT);
pinMode(buzzerPin, OUTPUT);
}
void loop() {
ArduinoCloud.update();
// Your code here
force = 0;
piezo = 0;
piezo = analogRead(piezoPin);
forceValue = analogRead(forcePin);
force = map(forceValue, 4095, 0, 0, 1000);
if (piezo > threshold) {
counter++;
Serial.print("Counter: ");
Serial.println(counter);
if (force > 0) {
counter_Bullseye++;
digitalWrite(buzzerPin, HIGH);
delay(100);
digitalWrite(buzzerPin, LOW);
Serial.print("Counter Bullseye: ");
Serial.println(counter_Bullseye);
Serial.print("Force: ");
Serial.println(force);
}
}
// Update cloud variables
// Ensure these assignments are correct and needed
counter = counter;
counter_Bullseye = counter_Bullseye;
force = force;
}