I got my imp and Hannah board today, and have had success getting a couple of the sample programs to work that just illuminate and flash the Hannah board’s LED.
However, I am having less success with the following two programs
The I2C bus addresses are all listed in the above link, and the fact that they have changed in the Rev 3 board is specifically mentioned in the Hannah.Rev3.SelfTest code by SmartMaker on GitHub (I thoroughly recommend checking out the SelfTest code by the way).
//I2C Addresses Rev3 (different from the previous Rev2!!!) const i2c_ioexp = 0x7C; const i2c_temp = 0x92; // this device is new in the Rev3 const i2c_als = 0xE8; const i2c_accel = 0x30; // this device is new in the Rev3
Note that these are 8-bit addresses so they do not need to be bit-shifted.
Still there is no code available for Accel or RGB sensor. The RGB sensor has been the same for years in Rev2! Did you find the temp code here in the forum?
The temp code came from the electric imp wiki. It’s nicely explained so should be easy to understand.
Later on I was able to get data from the accelerometer using code I found on GitHub. This code contains no comments or explanations so (at present) I don’t understand exactly how it works. Some study is required.
I have not (yet…) tried to use the RBG sensor as the project I’m thinking about doesn’t need it.
Interesting. The Accel code on Github was updated nearly a year ago. How can it possibly be Rev3? It appears to be Rev2 based on the i2C address 0x38 instead of 0x30 above. Please let me know if it works?
Hi sbright, I’m afraid I can’t help you with the RGB sensor at the moment - I’ve not used it.
sunhunder, I don’t understand your question. Can you add more detail?