OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
DeviceAddress *sensorsUnique;
int countSensors;
void printAddress(DeviceAddress deviceAddress) {
for (uint8_t i = 0; i < 8; i++) {
if (deviceAddress < 16) Serial.print("0");
_ Serial.print(deviceAddress*, HEX);_
_ }_
_}_ void setup() {
_ Serial.begin(115200);_
_ while (!Serial);_
_ sensors.begin();_
_ Blynk.begin(auth, ssid, pass);_
_ countSensors = sensors.getDeviceCount();_
_ Serial.print("Found sensors: ");_
_ Serial.println(countSensors);*_
* sensorsUnique = new DeviceAddress[countSensors];* * if (sensors.isParasitePowerMode()) {* * Serial.println("Mode power is Parasite");* * } else {* * Serial.println("Mode power is Normal");* * }* * for (int i = 0; i < countSensors; i++) {* _ sensors.getAddress(sensorsUnique*, i); } for (int i = 0; i < countSensors; i++) { Serial.print("Device "); Serial.print(i); Serial.print(" Address: "); printAddress(sensorsUnique); Serial.println(); } Serial.println(); for (int i = 0; i < countSensors; i++) { sensors.setResolution(sensorsUnique, 12); } } void loop() { float temperature[10]; sensors.requestTemperatures(); for (int i = 0; i < countSensors; i++) { temperature = sensors.getTempCByIndex(i); }*_
* for (int i = 0; i < countSensors; i++) {* * Serial.print("Device ");* * Serial.print(i);* * Serial.print(" Temp C: ");* Serial.print(temperature*, TEMPERATURE_PRECISION); _ Serial.println();* Blynk.virtualWrite(10, temperature );_
Please edit your post and put the code inside code tags, so we don't have to squint at italics.
Hint: If I gave you a ruler, and a box of sticks and asked you to make a procedure to find the longest stick, would you be baffled? Is the second stick you pull out bigger than the first one? The way that you would do it, is exactly how you would code it.
Please read the post at the start of any forum , entitled "How to use this Forum".
OR 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.
Please repost your
[ code ] tagged code in a new post please.