Update nano_c_mk1.ino
This commit is contained in:
parent
426e54507a
commit
e7825fbca4
|
@ -19,14 +19,17 @@ void setup() {
|
||||||
void loop() {
|
void loop() {
|
||||||
// TODO: The current reading is too slow for even the arduino's own ide's grapher cannot parse the data in time
|
// TODO: The current reading is too slow for even the arduino's own ide's grapher cannot parse the data in time
|
||||||
if (millis() - currTime >= WAIT_TIME) { // non-blocking time delay
|
if (millis() - currTime >= WAIT_TIME) { // non-blocking time delay
|
||||||
Serial.print("[");
|
for (i = 0; i < ADS_MAX; i++) {
|
||||||
for (i = 0; i < ADS_MAX; i++) {
|
adcReadings[i] = adc.readADC_SingleEnded(i) * VOLTAGE_RANGE / CONST_I2C;
|
||||||
Serial.print(adc.readADC_SingleEnded(i) * VOLTAGE_RANGE / CONST_I2C); // a raw to voltage conversion based from the library's method
|
|
||||||
if (i != ADS_MAX - 1) {
|
|
||||||
Serial.print(", ");
|
|
||||||
}
|
}
|
||||||
}
|
Serial.print("[");
|
||||||
Serial.println("]");
|
for (i = 0; i < ADS_MAX; i++) {
|
||||||
currTime = millis();
|
Serial.print(adcReadings[i]);
|
||||||
|
if (i != ADS_MAX - 1) {
|
||||||
|
Serial.print(", ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Serial.println("]");
|
||||||
|
currTime = millis();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue