// pi_picoCharting_Serial.ino //Send CSV data via Serial /* (c)2026 Forward Computing and Control Pty. Ltd. NSW Australia, www.forward.com.au This code is not warranted to be fit for any purpose. You may only use it at your own risk. This code may be freely used for both private and commercial use Provided this copyright is maintained. */ // from SafeString library #include "millisDelay.h" // read from ADC0 (GPIO 26) float tempC; float tempF; int ADC_reading; const int ADC_pin = 26; millisDelay plotDataDelay; unsigned long PLOT_DATA_DELAY_MS = 100; void setup() { Serial.begin(115200); plotDataDelay.start(PLOT_DATA_DELAY_MS); } unsigned long ms = 0; // print temp in C and F void loop() { if (plotDataDelay.justFinished()) { plotDataDelay.restart(); ms = millis(); ADC_reading = analogRead(ADC_pin); tempC = analogReadTemp(); // Get internal temperature tempF = tempC * 9.0 / 5.0 + 32.0; // Fahrenheit conversion Serial.print(ms); Serial.print(','); Serial.print(ADC_reading); Serial.print(','); Serial.print(tempC); Serial.print(','); Serial.println(tempF); } }