Code: Select all
Arduino: 1.6.5 (Linux), Board: "Z-Wave>ME Z-Uno, Europe, Disabled, Disabled"
Build options changed, rebuilding all
Using library ZUNO_DS18B20 in folder: /home/m/.arduino15/packages/Z-Uno/hardware/zw8051/2.0.6/libraries/ZUNO_DS18B20 (legacy)
/home/m/.arduino15/packages/Z-Uno/tools/zuno_toolchain/00.08.10/zuno_toolchain/compiler build /tmp/build5515980077194694846.tmp/MultiOneWire.cpp -r /home/m/.arduino15/packages/Z-Uno/hardware/zw8051/2.0.6
************* Building Arduino Sketch *************
/tmp/build5515980077194694846.tmp/MultiOneWire.cpp
***************************************************
Preprocessing file: /tmp/build5515980077194694846.tmp/Print.cpp with SDCPP...
Compiling /tmp/build5515980077194694846.tmp/Print_sdcpp_.cpp ...
Preprocessing file: /tmp/build5515980077194694846.tmp/Stream.cpp with SDCPP...
Compiling /tmp/build5515980077194694846.tmp/Stream_sdcpp_.cpp ...
Preprocessing file: /tmp/build5515980077194694846.tmp/HardwareSerial.cpp with SDCPP...
Compiling /tmp/build5515980077194694846.tmp/HardwareSerial_sdcpp_.cpp ...
Preprocessing file: /tmp/build5515980077194694846.tmp/HLCore.cpp with SDCPP...
Compiling /tmp/build5515980077194694846.tmp/HLCore_sdcpp_.cpp ...
Preprocessing file: /tmp/build5515980077194694846.tmp/ZUNO_OneWire.cpp with SDCPP...
Compiling /tmp/build5515980077194694846.tmp/ZUNO_OneWire_sdcpp_.cpp ...
Preprocessing file: /tmp/build5515980077194694846.tmp/ZUNO_DS18B20.cpp with SDCPP...
Compiling /tmp/build5515980077194694846.tmp/ZUNO_DS18B20_sdcpp_.cpp ...
Preprocessing file: /tmp/build5515980077194694846.tmp/_MultiOneWire.cpp with SDCPP...
Compiling /tmp/build5515980077194694846.tmp/_MultiOneWire_sdcpp_.cpp ...
MultiOneWire.ino:54:20:warning:conversion from string literal to 'char *' is deprecated
MultiOneWire.ino:68:19:warning:conversion from string literal to 'char *' is deprecated
MultiOneWire.ino:70:19:warning:conversion from string literal to 'char *' is deprecated
MultiOneWire.ino:74:22:warning:conversion from string literal to 'char *' is deprecated
Exception:'first_sketch_line'
(<type 'exceptions.KeyError'>, '<string>', 235)
MultiOneWire.ino:78:19:warning:conversion from string literal to 'char *' is deprecated['__cxx__Stream__method__println020a11', '__cxx__Stream__method__readBytesUntil030dp0d08', '__cxx__Stream__method__clearWriteError00', '__cxx__Stream__method__print010d', '__cxx__Print__method__printFloat021505', '__cxx__Stream__method__readBytes02p0508', '__cxx__HardwareSerial__method__write0105', '__cxx__HardwareSerial__method__find010d', '__cxx__DS18B20Sensor__init01prOneWire', '__cxx__OneWire__method__read00', '__cxx__Print__method__print020a11', '__cxx__HardwareSerial__method__write0109', '__cxx__HardwareSerial__method__available00', '__cxx__Stream__method__print020511', '__cxx__HardwareSerial__method__parseInt010d', '__cxx__Stream__method__println021511', '__cxx__Stream__method__printNumber020a05', '__cxx__HardwareSerial__method__printByteArr03p050505', '__cxx__Stream__method__findUntil02p05p0d', '__cxx__HardwareSerial__method__setWriteError0111', '__cxx__Stream__method__find02p0508', '__cxx__Stream__method__print020a11', '__cxx__HardwareSerial__method__find02p0d08', '__cxx__Stream__method__print021211', '__cxx__Print__method__print01p0d', '__cxx__HardwareSerial__method__write010a', '__cxx__Stream__method__println010d', '__cxx__HardwareSerial__method__write0112', '__cxx__HardwareSerial__method__write0111', '__cxx__Stream__method__findUntil04p0d08p0d08', '__cxx__Stream__method__println020911', '__cxx__Stream__method__readBytesUntil030dp0508', '__cxx__Print__method__setWriteError0111', '__cxx__Print__method__printNumber020a05', '__cxx__Print__method__println021211', '__cxx__Stream__init00', '__cxx__HardwareSerial__init0105', '__cxx__Print__method__print010d', '__cxx__Stream__method__println021111', '__cxx__Stream__method__print01p0d', '__cxx__HardwareSerial__method__parseFloat010d', '__cxx__Stream__method__println021211', '__cxx__Print__method__println020511', '__cxx__HardwareSerial__method__println00', '__cxx__HardwareSerial__method__flush00', '__cxx__HardwareSerial__method__find02p0508', '__cxx__Stream__method__println021611', '__cxx__Print__method__println021111', '__cxx__Stream__method__getWriteError00', '__cxx__HardwareSerial__method__peekNextDigit00', '__cxx__HardwareSerial__method__print020511', '__cxx__HardwareSerial__method__find01p0d', '__cxx__Print__method__println021511', '__cxx__Stream__method__println020511', '__cxx__HardwareSerial__method__printFloat021505', '__cxx__Stream__method__available00', '__cxx__Print__method__println021611', '__cxx__Stream__method__printByteArr03p050505', '__cxx__Print__method__println00', '__cxx__Print__method__println010d', '__cxx__HardwareSerial__method__setTimeout010a', '__cxx__Print__method__getWriteError00', '__cxx__Print__method__write02p0508', '__cxx__Stream__method__parseFloat00', '__cxx__HardwareSerial__method__readBytesUntil030dp0508', '__cxx__HardwareSerial__method__getWriteError00', '__cxx__HardwareSerial__method__print010d', '__cxx__HardwareSerial__method__println021511', '__cxx__Stream__method__findMulti02prMultiTarget11', '__cxx__HardwareSerial__method__print01p0d', '__cxx__Stream__method__findUntil02p0dp0d', '__cxx__HardwareSerial__method__readBytes02p0d08', '__cxx__HardwareSerial__method__peek00', '__cxx__Stream__method__println00', '__cxx__HardwareSerial__method__println021611', '__cxx__Print__init00', '__cxx__HardwareSerial__method__find01p05', '__cxx__HardwareSerial__method__timedPeek00', '__cxx__Print__method__printByteArr03p050505', '__cxx__Stream__method__write02p0508', '__cxx__Stream__method__setTimeout010a', '__cxx__OneWire__init0105', '__cxx__Stream__method__setWriteError0111', '__cxx__Stream__method__find01p05', '__cxx__Print__method__println020a11', '__cxx__HardwareSerial__method__println010d', '__cxx__Stream__method__parseFloat010d', '__cxx__HardwareSerial__method__parseInt00', '__cxx__Print__method__write0105', '__cxx__Stream__method__find02p0d08', '__cxx__Stream__method__flush00', '__cxx__HardwareSerial__method__findUntil04p0d08p0d08', '__cxx__HardwareSerial__method__parseFloat00', '__cxx__OneWire__method__reset00', '__cxx__OneWire__method__crc802p0505', '__cxx__HardwareSerial__method__write02p0508', '__cxx__Print__method__print020911', '__cxx__HardwareSerial__method__println021211', '__cxx__Print__method__println020911', '__cxx__Stream__method__parseInt00', '__cxx__Stream__method__timedRead00', '__cxx__HardwareSerial__method__findMulti02prMultiTarget11', '__cxx__Stream__method__read00', '__cxx__OneWire__method__skip00', '__cxx__HardwareSerial__method__println020a11', '__cxx__Print__method__print021211', '__cxx__Stream__method__print020911', '__cxx__Print__method__println01p0d', '__cxx__Stream__method__readBytes02p0d08', '__cxx__Stream__method__peek00', '__cxx__HardwareSerial__method__end00', '__cxx__HardwareSerial__method__printNumber020a05', '__cxx__HardwareSerial__method__readBytes02p0508', '__cxx__DS18B20Sensor__method__scanAloneSensor01p05', '__cxx__Print__method__print021511', '__cxx__HardwareSerial__method__findUntil02p05p0d', '__cxx__Print__method__print020511', '__cxx__HardwareSerial__method__read00', '__cxx__Print__method__print021611', '__cxx__DS18B20Sensor__method__getTemperature01p05', '__cxx__HardwareSerial__method__println020511', '__cxx__HardwareSerial__method__print021211', '__cxx__Stream__method__find01p0d', '__cxx__HardwareSerial__method__print021611', '__cxx__HardwareSerial__method__print021511', '__cxx__OneWire__method__depower00', '__cxx__Print__method__print021111', '__cxx__Stream__method__timedPeek00', '__cxx__Stream__method__peekNextDigit00', '__cxx__HardwareSerial__method__print020911', '__cxx__OneWire__method__write020505', '__cxx__OneWire__method__select01p05', '__cxx__HardwareSerial__method__timedRead00', '__cxx__Stream__method__parseInt010d', '__cxx__HardwareSerial__method__print021111', '__cxx__HardwareSerial__method__begin00', '__cxx__Stream__method__println01p0d', '__cxx__Stream__method__print021611', '__cxx__Stream__method__printFloat021505', '__cxx__HardwareSerial__method__println020911', '__cxx__Stream__method__print021511', '__cxx__Print__method__clearWriteError00', '__cxx__OneWire__method__readROM01p05', '__cxx__Stream__method__write0105', '__cxx__DS18B20Sensor__method__getTempC10001p05', '__cxx__Stream__method__find010d', '__cxx__HardwareSerial__method__readBytesUntil030dp0d08', '__cxx__HardwareSerial__method__print020a11', '__cxx__HardwareSerial__method__println021111', '__cxx__HardwareSerial__method__clearWriteError00', '__cxx__HardwareSerial__method__begin010a', '__cxx__Stream__method__print021111', '__cxx__HardwareSerial__method__println01p0d', '__cxx__HardwareSerial__method__findUntil02p0dp0d']Traceback (most recent call last):
File "<string>", line 235, in buildFunc
File "/tmp/zuno-packager/build/zuno_toolchain-00.08.10-linux64/uCxx.py", line 4824, in compileArduinoSketch
File "/tmp/zuno-packager/build/zuno_toolchain-00.08.10-linux64/uCxx.py", line 4658, in compileCPPPhase
File "/tmp/zuno-packager/build/zuno_toolchain-00.08.10-linux64/uCxx.py", line 4613, in advancedCompileCXX
File "/tmp/zuno-packager/build/zuno_toolchain-00.08.10-linux64/uCxx.py", line 3785, in CompileCXX
File "/tmp/zuno-packager/build/zuno_toolchain-00.08.10-linux64/uCxx.py", line 4416, in compilerPrintError
KeyError: 'first_sketch_line'
/home/m/.arduino15/packages/Z-Uno/tools/zuno_toolchain/00.08.10/zuno_toolchain/compiler returned 2
Error compiling.
Code: Select all
// Multiple temperature sensors
#include <ZUNO_DS18B20.h>
// DS18B20 pin connections
#define PIN_DS18B20_1 5
#define PIN_DS18B20_2 6
#define PIN_DS18B20_3 7
#define PIN_DS18B20_4 8
#define PIN_DS18B20_5 9
#define PIN_DS18B20_6 10
#define PIN_DS18B20_7 11
#define PIN_DS18B20_8 12
OneWire ow[8] =
{
OneWire(PIN_DS18B20_1),
OneWire(PIN_DS18B20_2),
OneWire(PIN_DS18B20_3),
OneWire(PIN_DS18B20_4),
OneWire(PIN_DS18B20_5),
OneWire(PIN_DS18B20_6),
OneWire(PIN_DS18B20_7),
OneWire(PIN_DS18B20_8)
};
DS18B20Sensor ds[8] =
{
DS18B20Sensor(&ow[0]),
DS18B20Sensor(&ow[1]),
DS18B20Sensor(&ow[2]),
DS18B20Sensor(&ow[3]),
DS18B20Sensor(&ow[4]),
DS18B20Sensor(&ow[5]),
DS18B20Sensor(&ow[6]),
DS18B20Sensor(&ow[7])
};
int temp[8];
ZUNO_SETUP_CHANNELS(
ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterTemp0),
ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterTemp1),
ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterTemp2),
ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterTemp3),
ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterTemp4),
ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterTemp5),
ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterTemp6),
ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterTemp7)
);
void setup() {
Serial.begin();
Serial.println("start");
}
void loop()
{
float temperature;
byte addr[8];
for (int x=0; x<8; x++)
{
ds[x].scanAloneSensor(addr);
temperature = ds[x].getTemperature(addr);
temp[x]=int(temperature*100);
Serial.print("Sensor ");
Serial.print(x);
Serial.print(" address is: ");
for (int i = 0; i < 8; i++)
{
Serial.print(addr[i], HEX);
Serial.print(" ");
}
Serial.println();
Serial.print("Temperature: ");
Serial.println(temperature);
Serial.println();
}
zunoSendReport(1);
delay(30000);
}
word getterTemp0()
{
return temp[0];
}
word getterTemp1()
{
return temp[1];
}
word getterTemp2()
{
return temp[2];
}
word getterTemp3()
{
return temp[3];
}
word getterTemp4()
{
return temp[4];
}
word getterTemp5()
{
return temp[5];
}
word getterTemp6()
{
return temp[6];
}
word getterTemp7()
{
return temp[7];
}