Hello. I need a real big help here. I'm a newbie in coding and using Arduino. Since this project is related to my Final Year project, i really need help here. I need to do a multiple DS18B20 temperature sensors, which is 10, using Arduino Uno + Arduino Sensor Shield V4.0 to measure a DIY water bath.
I really can found any sources from the internet that using Sensor Shield since all of the sites that i visited were using breadboard insyead of the sensor shield. Can anyone please help me. Furthermore, below is my current coding that i think might work, but somehow the serial monitor showing rapidly 'error' all the way.
#include <OneWire.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS 3
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
int sensorPin = A0;
int sensorPin = A1;
int sensorPin = A2;
int sensorPin = A3;
int sensorPin = A4;
int sensorPin = A5;
int sensorPin = A6;
int sensorPin = A7;
int sensorPin = A8;
int sensorPin = A9;
float tempC;
void setup()
{
pinMode (A, Input);
sensors.begin();
Serial.begin(9600);
}
void loop()
{
int val;
val=analogRead(0);
Serial.println(val);
Serial.print("Sensor ");
Serial.print(i+1);
Serial.print(" : ");
tempC = sensors.getTempCByIndex(i);
Serial.print(tempC);
Serial.print((char)176);//shows degrees character
Serial.print("C | ");
delay(1000);
}