Tsic Sensoren


I am generally neu in the programming and specificaly with arduino.
I´am trying to programm 4 Temperature Sensor wich communicate with Arduino Uno Board and the results will be in PLX DAQ excel indicated.
My programm funktionert perfectly and now i just want to make some modification, to let the programm more compact and with using an iterative Sensorarray Funktion(for, while,loop or another funktion) .
Can someone help me? Have you some ideas?

Tsic.txt (1.35 KB)

Hi, Welcome to the forum.

Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code. It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom... :)

Your code would be more efficient if you used arrays for the TSIC objects and the temperatures. There is NO reason to have 4 separate variables to hold the data read from each sensor when the data is ONLY used in a local block.

If you have 4 cans of beer, and wish to drink them all from a glass, you need one glass, not 4.

Conditionally printing, or not, to the Serial instance is NOT a good idea, when the data is being sent to Excel. You should ALWAYS print the data. You need a way to indicate that the data is good, or not, based on the data, NOT on the lack of data.

Thank you for your answer.

I understand what do you mean. and i try to look for a kind of array Sensor but i didn´t found it(or i missed something)because the initialization of sensor have to be like that TSIC sensorNUM(signal,+vcc)
can you tell me how can i do this? Any suggestion in Code?

can you tell me how can i do this?

TSIC Sensors[] = { TSIC(11, 12), TSIC(10, 12), TSIC(9, 12), TSIC(8, 12) };

The array type is TSIC, not Sensor.

Thank you very much PAULS für your Help :) .