Closed PaulaScharf closed 2 weeks ago
Water temperature sensor doesnt return its value.
Following blockly code:
results in following arduino code:
#include <senseBoxIO.h> #include <OneWire.h> // http://librarymanager/All#OneWire #include <DallasTemperature.h> // http://librarymanager/All#DallasTemperature #define ONE_WIRE_BUS 1 OneWire oneWire(ONE_WIRE_BUS); DallasTemperature sensors(&oneWire); float getWaterTemp(){ sensors.requestTemperatures(); sensors.getTempCByIndex(0); } void setup() { SerialUSB.begin(300); sensors.begin(); } void loop() { SerialUSB.println(getWaterTemp()); delay(1000); }
I think getWaterTemp needs to return sth or Im completely misunderstanding this code.
getWaterTemp
Also potentially for the MCU-S2 the pin needs to change from 1 to 3 (and 3 to 5 and 5 to 7)
Extension of this issue:
Update the block and allow reading multiple temperature sensors attached to one onewire adapter board. It's possible to hook up to 6 Sensors to one board.
Water temperature sensor doesnt return its value.
Following blockly code:
results in following arduino code:
I think
getWaterTemp
needs to return sth or Im completely misunderstanding this code.Also potentially for the MCU-S2 the pin needs to change from 1 to 3 (and 3 to 5 and 5 to 7)