

This seems to run flawlessly, I get the appropriate value from the sensor and never see a “W” in the Serial monitor. While (Wire.available() = 0) Serial.print("W") Wire.requestFrom(address, 1) // The TinyWire library only allows for one byte to be requested at a time I tested it with an Arduino Uno running the code: #include It’s supposed to read, then send the data each time it gets a request. This gets the useful information from the sensor and fits it into one byte so that it can be sent in one cycle. TinyWireS.onRequest(transmit) // When requested, call function transmit() TinyWireS.begin(I2CSlaveAddress) // Begin I2C Communication The attiny is running the code: #include // Requires fork by Rambo with onRequest supportĬonst int I2CSlaveAddress = 8 // I2C Address. I have the Attiny using the TinyWireS library for I2C communication with Attiny as slave. I built a small board (as seen in image below) that has the data pull-up resistors and the other passives required to run the moisture sensor. I had an Attiny85 lying around, as it has 3 ADCs on board I was hoping I could get it to read the voltage and then transfer it to the NodeMCU (via I2C) so that the Node could then post it to the Blynk server. This is being added as an afterthought to my original project as I am now giving it the ability to water based on recent conditions - I’ve already completed that part but I’m having issues with the IO expansion. I was looking to expand the analogue input on my NodeMCU as I needed to interface with both an LDR to get light levels as well as a capacitive soil moisture sensor.
