Hi everyone, I just started to use Ubidots for my school project. My program needs to output a voltage ramp signal and read sensors signal coming in at the same time. It will need to read 510 points of data and send it to Ubidots. However, it takes way too long (about 30 minutes) for the MCU (Feather) to complete one test. I’m not sure if it’s my code or it is because of the speed limits on Education account?
Here is the basic of my program:
Is there a better way to send 510 points faster?
//Create upper ramp voltage reference
while (vref<255){
analogWrite(5,vref);
Serial.print(vref);
Serial.print("\t");
//Read Voltage sensor values
sensorValue = analogRead(A0);
voltage = sensorValue * (5.0/1023.0);
client.add(VOLTAGE, voltage);
Serial.print(voltage);
//Read Current sensor values
currentValue = analogRead(A2);
current = currentValue * (5.0 / 1023.0);
client.add(CURRENT, current);
//print out the values you read:
Serial.print("\t");
Serial.println(current);
client.sendAll();
vref++;
delay(50);