Pages: [1]   Go Down
Author Topic: get an onwire.h error  (Read 987 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
if i want to upload my program on my Arduino Due,
i got some error, but i dont understand what they mean...
can you help me?
Code:
In file included from /Users/Simon/Documents/Arduino/libraries/libraries/DallasTemperature/DallasTemperature.h:22,
                 from wifiTestServer.ino:1:
/Users/Simon/Documents/Arduino/libraries/libraries/OneWire/OneWire.h:77: error: #error "Please define I/O register types here"
/Users/Simon/Documents/Arduino/libraries/libraries/OneWire/OneWire.h:84: error: 'IO_REG_TYPE' does not name a type
/Users/Simon/Documents/Arduino/libraries/libraries/OneWire/OneWire.h:85: error: ISO C++ forbids declaration of 'IO_REG_TYPE' with no type
/Users/Simon/Documents/Arduino/libraries/libraries/OneWire/OneWire.h:85: error: expected ';' before '*' token
wifiTestServer.ino: In function 'void sendMessage(float)':
wifiTestServer:148: error: 'PSTR' was not declared in this scope

Thanks
Logged

0
Offline Offline
God Member
*****
Karma: 26
Posts: 621
Always making something...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe you have OneWire version 2.1 or 2.0 ?

Version 2.2 added support for Due.

http://www.pjrc.com/teensy/td_libs_OneWire.html

However, it may not be stable/reliable until Arduino 1.5.3 is released.  Try the nightly build if 1.5.2 doesn't work.
« Last Edit: March 21, 2013, 06:39:48 am by Paul Stoffregen » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i updated my both librarys, Dallas and OneWire, now i got
Code:
wifiTestServer.ino: In function 'void sendMessage(float)':
wifiTestServer:138: error: 'PSTR' was not declared in this scope

void sendMessage(float value)
{
  client.println(F("HTTP/1.1 200 OK\r\nContent-Type: text/html\r\nContent-length: 29\r\n\r\n"));
  client.println();
  client.println(F("<html>"));
  client.println("<body>");
  client.println(value);
  client.println("C");
  client.println("</body>");
  client.println(F("</html>"));
  delay(1);
  char c = client.read();
}

found the mistake thankssssssss
« Last Edit: March 21, 2013, 07:00:53 am by helming » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm having a very similar problem getting onewire library going on my Due. I have the nightly build of the of IDE 1.5.2, from http://downloads.arduino.cc/arduino-nightly-windows.zip, and the version 2.2 of the onewire library from the link above. However every time I try to compile the DS18x20_Temperature sketch I get this error:

Code:
Arduino: nightly (Windows 7), Board: "Arduino Due (Programming Port)"
In file included from DS18x20_Temperature.pde:1:
C:\Users\laptop\Documents\Arduino\libraries\OneWire/OneWire.h:77: error: #error "Please define I/O register types here"
C:\Users\laptop\Documents\Arduino\libraries\OneWire/OneWire.h:84: error: 'IO_REG_TYPE' does not name a type
C:\Users\laptop\Documents\Arduino\libraries\OneWire/OneWire.h:85: error: ISO C++ forbids declaration of 'IO_REG_TYPE' with no type
C:\Users\laptop\Documents\Arduino\libraries\OneWire/OneWire.h:85: error: expected ';' before '*' token

Any ideas? I got a Due in order to have a much easier time running the display for my project that is already mounted in the control panel. I'm new to arduino and to C++ but not to programing. Totally stumped here, worried I'm going to end up over my head in the code of the library.
Thanks
Logged

Pages: [1]   Go Up
Jump to: