Hannah RGB sensor

Still no Squirrel code? It’s the same from Rev2 to Rev3. Please?

Tried writing some yourself? I’m afraid I’ve not had time.

I would take the time to do it if I was certain nobody else has. Rev2 has been around for over a year now, it’s hard to believe nobody has done it.

If someone does it, please share :slight_smile:

http://forums.electricimp.com/discussion/2015/new-hannah-code-online

I tried loading that code into my hannah rev3 (which works fine uploading temp readings) and got the following errors:

2013-12-27 18:29:58 UTC-5: [Agent] the index ‘hardware’ does not exist
2013-12-27 18:29:58 UTC-5: [Agent] at constructor:1366
2013-12-27 18:29:58 UTC-5: [Agent] from main:1454

Am I missing something simple?

I had the same problem, so I have changed the folloing line 1395:
temp = TempSensor_rev2(i2c, 0x98, ioexp, 4);
in:
temp = TempSensor_rev3(i2c, 0x92, ioexp, 4);
there must be something wrong in line 1396:
if (temp._disabled) temp = TempSensor_rev3(i2c, 0x92, ioexp, 4);
but I’m too lazy to find out what…

Still no luck. This board looked like it could be a really nice way to simplify a fan controller I had running with an old basic stamp 2, but it is super hard to find anyone with working examples to get a starting point :frowning:

Anyone else have input as to what could be wrong?

Hey guys,

Thats an odd one. Can you give me a bit of info about your setup? What OS version are your imps running? Are you running low on memory?

If you are using rev3’s then you can happily delete the rev2 classes or simply comment out the instantiation of the rev2 classes.

From:
acc = Accelerometer_rev2(i2c, 0x38, ioexp, 3); if (acc._disabled) acc = Accelerometer_rev3(i2c, 0x30, ioexp, 3);

to:
acc = Accelerometer_rev3(i2c, 0x30, ioexp, 3);

and of course the same for the temperature sensor.

 A.

if (acc._disabled)
This never happens…

What happens if you make the change I suggested?
Did you make any other changes to the code? Can you send me the buggy version?
What OS version are your imps running? Are you running low on memory?

A.

2013-12-27 18:29:58 UTC-5: [Agent] the index ‘hardware’ does not exist

Am I missing something simple?
Quite possibly, yes: only device code has access to the “hardware” object. Make sure you haven’t stuck the Hannah code in the agent-code section by mistake.

Peter