Hello Everyone,
I am completely rookie. I need help on a project. I am trying to get acs712 data to google sheet via hc05. I tried ProfessorCad: Snippets. But facing multiple problems.
a. Till time i dont click "View File" it doesn't show anything.
b. How to i share it to googlesheet realtime?
Arduino code is mentioned below. Its for DC current.
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int adc = analogRead(A0);
float voltage = adc*5/1023.0;
float current = (voltage-2.5)/0.185;
Serial.print("Current : ");
Serial.println(current);
delay(300);
}
You could add a Label devoted to showing the last incoming message. Update it in the Clock Timer event that checks for incoming messages.
Google Sheets is not rigged to support real time updating for something like voltages. Their free tier is in no rush.
However, that does not stop you from timestamping your voltages far upstream, and including a timestamp with each reading, for later uploading to Google Sheets.
I see you restrict your timestamps to just the file names of the files you store, which is not exactly real time in my book.
I'm not sure if your hardware has facilities for setting the date and time, for inclusion with messages. Milliseconds from 1970 is the typically easiest timestamp format, requiring no format conversion for plotting x,y values.