Hey fellas,
Please reference http://www.liquidware.com/system/0000/3180/Humidity_Sensor_Cheatsheet.pdf.
Board: NXP-LPC1768
Firmware: 21164
Sensor: SHT21 Humidity and Temperature Sensor
I once had the simple project listed in the .pdf file above working, but that was on an Arduino board. I would like to make this sensor work for an mbed board.
The code I have is as follows, and I believe I have it nearly completely ported over from the Arduino style function calls, to the mbed style function calls, although, please pay special attention to lines 138 and 140 of LibHumidity.cpp, where I am attempting to cast a char * to uint8_t.
/media/uploads/TheKirkwoods/libhumidity.zip
Question 1: Is my casting correct? Does it look as if something is incorrect?
Question 2: Why would I be getting incorrect results on the serial output, and further, why are the outputs not changing when I change the humidity or the temperature of the room??
Lastly, I am aware that Arduino uses 5V, and mbed uses 3V3, although, I am providing 5V to the board itself from pin 39, USB 5.0V.
Any help would be greatly appreciated.
Thanks!
Scott
Hey fellas,
Please reference http://www.liquidware.com/system/0000/3180/Humidity_Sensor_Cheatsheet.pdf.
Board: NXP-LPC1768 Firmware: 21164 Sensor: SHT21 Humidity and Temperature Sensor
I once had the simple project listed in the .pdf file above working, but that was on an Arduino board. I would like to make this sensor work for an mbed board.
The code I have is as follows, and I believe I have it nearly completely ported over from the Arduino style function calls, to the mbed style function calls, although, please pay special attention to lines 138 and 140 of LibHumidity.cpp, where I am attempting to cast a char * to uint8_t.
/media/uploads/TheKirkwoods/libhumidity.zip
Question 1: Is my casting correct? Does it look as if something is incorrect?
Question 2: Why would I be getting incorrect results on the serial output, and further, why are the outputs not changing when I change the humidity or the temperature of the room??
Lastly, I am aware that Arduino uses 5V, and mbed uses 3V3, although, I am providing 5V to the board itself from pin 39, USB 5.0V.
Any help would be greatly appreciated.
Thanks!
Scott