I’m trying to use this I2C soil moisture sensor with the Electron
Their github refers to this tutorial for working with particle devices.
The libraries and code example are here
I have tried to port Apollo77’s examples using the above-mentioned tutorial
Basically, this is their instructions for porting the code are
" 3) INCLUDES In any library or example files you added to your project, strip out “define if/else” statements and their contents, then replace them with the following line (which will add Wire library and device functionality): #include “Particle.h”
"
I tried this with no success because of the wire library.
I was wondering if someone has already got this sensor working on a particle device and could share their code.
What is this supposed to mean?
Do you get any error messages? Posting them would help.
But without knowing your error messages, I'd guess you get a file not found message, which is exactly why they said "wire library is included via Particle.h"
in the example programs like ReadSensorData.ino
delete #include Wire.h
remember to include 10K pull up resistors on D0 (SDA) and D1 (SCK) - these ports are wired to pins SDA and SCK on the sensor header. Wire VCC to 3.3V and GND to GND - four wires total. The MISO and Reset pins on the sensor are not used for these examples