From b6d49bd6f85f16bce35ce67490ad714e7f088d29 Mon Sep 17 00:00:00 2001 From: tth Date: Fri, 22 Feb 2019 17:16:01 +0100 Subject: [PATCH] now reading all 4 tempecaptors --- simulator/rdtemp/rdtemp.ino | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/simulator/rdtemp/rdtemp.ino b/simulator/rdtemp/rdtemp.ino index 9f2610c..6042e2f 100644 --- a/simulator/rdtemp/rdtemp.ino +++ b/simulator/rdtemp/rdtemp.ino @@ -6,8 +6,6 @@ #define NBVAL 4 #define DELAI 12000 -int values[NBVAL]; - /* -------------------------------------------------- */ void setup() { Serial.begin(9600); @@ -21,33 +19,43 @@ void setup() { analogReference(INTERNAL1V1); // Pour Arduino Mega2560 delay(1000); + Serial.print("M running\n"); } /* -------------------------------------------------- */ -void updatevalues(void) +/* ================================================== */ +short adc_pins[] = { A0, A1, A2, A4 }; +/* -------------------------------------------------- */ +void updatevalues(short *ptr) { int foo; for (foo=0; foo