hah_arduino problem.

4 replies [Last post]
maxlock
Offline
Joined: 1 Mar 2011

Hi There,

 First off, great project! I've been meaning to do something like this for ages :)

 I've checked out the arduino code, and am playing with the UDPtest demo. Theres a couple of minor problems, firstly the Wprogram.h include in EtherCard.cpp has the incorrect case, needs to be WProgram.h Secondly there some sort of variable scope problem resulting in heartbeats that don't have the source field populated and responses to requests not happening, again caused by the source variable.

 I'm not really a coder, any chance someone could take a look? I've tried the code on versions 18 and 22 of the IDE.

-Thanks again, Max.

brett
Offline
Providence, United States
Joined: 9 Jan 2010
that code

Yeah all that code was really rough and ready - I had starting doing some work down that road but got side tracked with other more important things like: moving countries and being a dad.

Unfortunate my time and workshop is now is VERY limited so it might be a while before I get back to playing with that code base.  As I'm the only guy coding the entire HAH project some help would be useful !

I have a worknig arduino 1wire sensor with ethernet so if/when I get some time I'll post it up.

Brett

maxlock
Offline
Joined: 1 Mar 2011
Hi Brett, No problem, done

Hi Brett,

 No problem, done both of those things myself :) no worries about the code, I'll keep looking at it, not done any C in 10 years now so it's good practise apart from anything else.

 -Cheers Max

brett
Offline
Providence, United States
Joined: 9 Jan 2010
posted 1wire sample

I updated to the SVN my 1wire xAP code - just update your SVN and you'll pick you this new code.

I checked the program you said you had an issue with - it compiled out of the box for me.

Can you post your changes?

maxlock
Offline
Joined: 1 Mar 2011
EtherCard.cpp

Hi Brett,

 The only change I made was to EtherCard.cpp line 5 to correct the filename case. Are you building on Windows or Linux as I believe Windows isn't case sensitive.

 #include <WProgram.h>

 The xapUDPtest code then compiles just fine. I'll have a play with the 1wire code too.

 

 -Cheers Max.

Hardware Info