Closed rickysullivan closed 6 years ago
Thanks for filing! The DHT11 sensor requires an intermediary μC that we've dubbed a "backpack", inspired by Adafruit's products of a similar nature. Take a look at this example: http://johnny-five.io/examples/multi-DHT11_I2C_NANO_BACKPACK/
Still getting error:
1471872406594 Device(s) RaspberryPi-IO
1471872407444 Connected RaspberryPi-IO
1471872407697 Repl Initialized
>> ready
events.js:141
throw er; // Unhandled 'error' event
^
Error: EIO: i/o error, read
at Error (native)
I've plugged the DHT11 into I2C-1.
I'm not sure I understand what you mean by this:
I've plugged the DHT11 into I2C-1.
The DHT11 itself isn't an I2C device—you'd need to connect it to another microcontroller that itself has the provided firmware running on it:
Then, your code should be:
var temp = new five.Thermometer({
controller: "DHT11_I2C_NANO_BACKPACK"
});
temp.on("change", function() {
console.log("temperature");
console.log(" celsius : ", this.celsius);
console.log(" fahrenheit : ", this.fahrenheit);
console.log(" kelvin : ", this.kelvin);
console.log("--------------------------------------");
});
The controller wouldn't be a GROVEPI
, since the Grove Pi itself is just another I2C device on the bus. The controller is our own DHT11_I2C_NANO_BACKPACK
, which knows how to speak to the provided firmware, which you upload to whatever intermediary microcontroller you choose to use (in the diagram, I've used a nano, which I highly recommend)
Have you had a chance to try the example shown above?
Hi @rickysullivan
I'm going to close this since we haven't heard back. Feel free to re-open if necessary.
I can't seem to get my app running:
I've had success with the LCD, but none of the other sensors.