Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTU21D doesn't work with later mraa versions #457

Closed
arfoll opened this issue Aug 23, 2016 · 11 comments
Closed

HTU21D doesn't work with later mraa versions #457

arfoll opened this issue Aug 23, 2016 · 11 comments

Comments

@arfoll
Copy link
Contributor

arfoll commented Aug 23, 2016

Mraa's i2c error dection fixes have broken the HTU21D driver - see details here: https://communities.intel.com/thread/104939

@whpenner
Copy link
Contributor

I was making some changes on my weather system the other day and noted that the htu21d code has another problem. About line 226/227 there are two - one byte register reads. That should be one 16-bit read according to the documentation. I was going to update the code, but my HTU21D part died and I haven't been able to get another up and running yet to verify the fixes.

Bill

@Propanu
Copy link
Contributor

Propanu commented Aug 23, 2016

We have a PR pending for this #433 but it isn't signed. @whpenner feel free to resubmit your version.

@whpenner
Copy link
Contributor

Ok, I'll probably send it up this evening or tomorrow morning. I've made the code changes and need to finish testing it.

@g-vidal
Copy link
Contributor

g-vidal commented Aug 31, 2016

Hi
I am having great trouble with this sensor.... @arfoll pointed to my post in mraa discussions.
Would you please tell me if you can detect your HTU21D-F on the bus i2c with the standard i2cdetec command ?

I have checked various demo and startup programs from the arduino IDE, there are great differences including the one you are pointing out on the 2byte readings. There is another one concerning the release of the i2c bus which is necessary if another sensor is on the same bus. Have you seen this one (I found it on the datasheet)? Do you intend to amend it in your proposal ?

i have had no time to come into the code but I may find some time this weekend if that helps, let me know. Thanks for your work.
Best regards
Gérard

@g-vidal
Copy link
Contributor

g-vidal commented Aug 31, 2016

How can I remove my #433 proposal ?
I am pretty sure that it solves only partially the problem but I had not been able to provide a complete solution....

Thanks

@whpenner
Copy link
Contributor

I have a pull request up that will make a change to the reset function. It was missing the actual command to perform the reset. I use this sensor in combination with other sensors without any issue. You do need to make sure you have adequate pull-up resistors to either 3.3 or 5v (usually 3K - 10K) for both the SDA and SCL signals.

Bill

@Propanu
Copy link
Contributor

Propanu commented Aug 31, 2016

Hi @g-vidal, I've merged the fix from @whpenner (77fbf49). Please let me know if the sensor is working for you as expected now. I will close #433 since the fix covers the changes in there too.

@rista86
Copy link

rista86 commented Sep 2, 2016

When can we expect this package fixed on npm? Or can someone build the latest verison and provide us with the .node file so we can update manually? Thanx!

@Propanu
Copy link
Contributor

Propanu commented Sep 2, 2016

Hi @rista86. If you want to test this manually, download the latest development ipk from here. It can be unzipped (twice) and you will find the .node module in there. Built with Node 4 for i586 (Galileo, Edison, Minnowboard 32-bit).

Meanwhile we are coming up with a generic solution for npm that will allow you to install the UPM modules regardless of Node version and architecture, but it will take a little longer. See #325 also.

@g-vidal
Copy link
Contributor

g-vidal commented Sep 4, 2016

Le 31/08/2016 à 19:27, Mihai Tudor Panu a écrit :

Hi @g-vidal https://github.com/g-vidal, I've merged the fix from
@whpenner https://github.com/whpenner (77fbf49
77fbf49).
Please let me know if the sensor is working for you as expected now. I
will close #433 #433
since the fix covers the changes in there too.

Yes @whpenner has really made a great work, congratulations and thanks!

I have cheked the code on a minibreakout with level shifter and with the
last mraa (compiled from git clone), it works perfectly ! @whpenner has
also included the hold mode which enables to have other sensors on the
i2c without any trouble. There is no need of pull-up resistor in my case.

It is still not possible to detect the HTU21D with the iodetect command
:-\ but every HTU21D user knows thet the adress is 0x40 then one can manage.
Thank you and thanks to @whpenner https://github.com/whpenner you can
delete my first proposal.

best regards

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#457 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEus8RfRsxBhIQEom1N3UZSPJDlhd_byks5qlblygaJpZM4Jq49F.

Gérard Vidal
Chargé de mission normes et veille technologique et numériques auprès du
Directeur de l'IFÉ.
Université de Lyon : IFÉ / ENS de Lyon 15 Parvis rené Descartes 69342
Lyon Cedex07.
tel : +334 26 73 12 60.
onglet logos

@Propanu
Copy link
Contributor

Propanu commented Sep 7, 2016

I've seen at least 2 other sensors that don't show up in the table with i2cdetect but work fine when you start sending commands to them from MRAA. It might be very well the fact that i2cdetect tries to read a byte and some devices transfer a full word at a time, as @whpenner suggested on the forums.

Thanks a lot for confirming the sensor module works as expected after the patch!

@Propanu Propanu closed this as completed Sep 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants