Hi! I write one sketch this for test: Code: #include <OneWire.h> #include <DallasTemperature.h> #define ONE_WIRE_BUS 40 OneWire oneWire(ONE_WIRE_BUS); DallasTemperature sensors(&oneWire); void setup(void) { Serial.begin(9600); Serial.println("Dallas Temperature IC Control Library Demo"); sensors.begin(); } void loop(void) { Serial.print("Conected..."); sensors.requestTemperatures(); Serial.println("OK"); Serial.print("Temperature: "); Serial.print(sensors.getTempCByIndex(0)); } I import the libraries OneWire and DallasTemperature for Ardunio 1 in /home/ubuntu/Arduino/libraries When i see the serial Monitor I can not see nothing. If I comment the lines of sensors, the serial monitor show "conected .. OK. Temperature" In MEGA Ardunio this code works perfectly. Any suggestions? Thanks!
I have the same problem, in my case i have a problem with float variables, e.g. void setup() { float f = 0.1; Serial.println(f); } it crashes my ardu in udoo, when i replace float to int in DallasTemperature then it work, sometimes when i use sprintf then crash it, sorry for my en
Correction to my earlier post. The 'Serial' library is documented as supporting "any data type" (not sure they mean that literally, but for sure Strings and Floats are supposed to work out of the box). Clearly it doesn't. Here is an example of a workaround - use an array of chars with a Null terminator. char myTestString [ ] = "Test string\0"; Serial.println(myTestString);
Hi, i have the same problem (no output on serial with those libraries) and i hope it gets fixed soon. I don't understand why it works on my normal Due and not on the UDOO. I don't know how to change my code in order to make it work. Code: #include <OneWire.h> #include <DallasTemperature.h> #define ONE_WIRE_BUS 3 int led_temp = 9; OneWire oneWire(ONE_WIRE_BUS); DallasTemperature sensors(&oneWire); DeviceAddress Thermometer_1 = {0x28, 0xF9, 0xE2, 0x20, 0x05, 0x00, 0x00, 0xE6}; void setup() { Serial.begin(9600); pinMode(led_temp,OUTPUT); sensors.begin(); // Einstellung der Aufl?sung auf 10 bit sensors.setResolution(Thermometer_1, 10); } void loop() { sensors.requestTemperatures(); float Temperatur_1 = sensors.getTempC(Thermometer_1); Serial.print("0"); Serial.print("#"); Serial.println(Temperatur_1); if(Temperatur_1>23) { digitalWrite(led_temp,HIGH); } else { digitalWrite(led_temp,LOW); } delay(1000); }
I've tried pretty much every trick in the book to get anything with onewire.h or dallastemp.h libraries to work but I'm always greeted with errors In file included from one_wire_address_finder.pde:7:0: /opt/arduino-1.5.4/libraries/OneWire/OneWire.h:77:2: error: #error "Please define I/O register types here" /opt/arduino-1.5.4/libraries/OneWire/OneWire.h:84:5: error: 'IO_REG_TYPE' does not name a type /opt/arduino-1.5.4/libraries/OneWire/OneWire.h:85:14: error: 'IO_REG_TYPE' does not name a type I've tried different library versions and so forth but so far no luck. On Windows 7 computer with arduino 1.0.5 and 1.5.5 rc2 everything works just fine. What the heck is wrong with the udoo arduino ide?