Hi Guys,
So I am a little confused by some code that I have pulling out temperature readings and printing them in the serial port.
Definition of setup;
The setup() function is called when a sketch starts. Use it to initialize variables, pin modes, start using libraries, etc. The setup function will only run once, after each powerup or reset of the Arduino board.
void setup() /*----( SETUP: RUNS ONCE )----*/
{
/*-(start serial port to see results )-*/
delay(1000);
Serial.begin(9600);
Serial.println("YourDuino.com: Electronic Brick Test Program");
Serial.println("Temperature Sensor DS18B20");
delay(1000);
/*-( Start up the DallasTemperature library )-*/
sensors.begin();
}/*--(end setup )---*/
So why does this set of commands run every time I open the serial port? I can understand why the following temperature readings appear as they are in the loop structure.