this is joel
i just started with the arduino uno
i can get the example blink to work properly on the uno
trying to get the ds18b20 temp sensor to work
i have the onewire library downloaded and installed
i get the error below, below that is the code i am using
also i am using windows xp, don't know if that makes a difference
Blink:4: error: 'OneWire' does not name a type
Blink.ino: In function 'void loop()':
Blink:18: error: 'ds' was not declared in this scope
Blink:30: error: 'OneWire' has not been declared
#include <OneWire.h>
// DS18S20 Temperature chip i/o
OneWire ds(10); // on pin 10 << error happens here
void setup(void) {
// initialize inputs/outputs
// start serial port
Serial.begin(9600);
}
The "'OneWire' does not name a type" error means that OneWire.h is not being loaded. You either placed it in an incorrect directory, the file is corrupt, or need to restart your IDE.
got past the OneWire ds(10); // on pin 10 error
have this sketch built in the libraries directory so all libraries should be accessable
now i get this error using the above code
BareMinimum.ino: In function 'void loop()':
BareMinimum:26: error: call of overloaded 'print(byte [8], int)' is ambiguous
C:\arduino\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\hardware\arduino\cores\arduino/Print.h:59: note: candidates are: size_t Print::print(unsigned char, int)
C:\arduino\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\hardware\arduino\cores\arduino/Print.h:60: note: size_t Print::print(int, int)
C:\arduino\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\hardware\arduino\cores\arduino/Print.h:61: note: size_t Print::print(unsigned int, int)
C:\arduino\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\hardware\arduino\cores\arduino/Print.h:62: note: size_t Print::print(long int, int)
C:\arduino\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\hardware\arduino\cores\arduino/Print.h:63: note: size_t Print::print(long unsigned int, int)
BareMinimum:62: error: incompatible types in assignment of 'uint8_t' to 'byte [12]'
BareMinimum:63: error: call of overloaded 'print(byte [12], int)' is ambiguous
C:\arduino\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\hardware\arduino\cores\arduino/Print.h:59: note: candidates are: size_t Print::print(unsigned char, int)
C:\arduino\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\hardware\arduino\cores\arduino/Print.h:60: note: size_t Print::print(int, int)
C:\arduino\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\hardware\arduino\cores\arduino/Print.h:61: note: size_t Print::print(unsigned int, int)
C:\arduino\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\hardware\arduino\cores\arduino/Print.h:62: note: size_t Print::print(long int, int)
C:\arduino\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\hardware\arduino\cores\arduino/Print.h:63: note: size_t Print::print(long unsigned int, int)
BareMinimum:67: error: 'smiley' was not declared in this scope
BareMinimum:67: error: 'cool' was not declared in this scope