File tree Expand file tree Collapse file tree 3 files changed +35
-1
lines changed
Example_02_ReadingsAndLED
Example_03_LEDFlashMoisture Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 55 *
66 * SPDX-License-Identifier: MIT
77 *
8+ * This example demonstrates how to read the soil moisture sensor value.
9+ *
10+ * Supported Sensor:
11+ * Qwiic Soil Moisture Sensor https://www.sparkfun.com/sparkfun-qwiic-soil-moisture-sensor.html
12+ *
13+ * Hardware Connections:
14+ * - Connect the Qwiic Soil Moisture Sensor to the Qwiic connector of your development board (SparkFun Thing Plus, ReadBoard ...etc.)
15+ * If you don't have a development board with a Qwiic connector, you can purchase one at sparkfun.com
16+ * - Connect the development board to your computer using a USB cable.
17+ * - Open the Serial Monitor at a baud rate of 115200 to see the sketch output.
18+ *
819 *---------------------------------------------------------------------------------
920 */
1021
Original file line number Diff line number Diff line change 55 *
66 * SPDX-License-Identifier: MIT
77 *
8+ * This example demonstrates how to read the soil moisture sensor value and flash the senors on-board LED.
9+ *
10+ * Supported Sensor:
11+ * Qwiic Soil Moisture Sensor https://www.sparkfun.com/sparkfun-qwiic-soil-moisture-sensor.html
12+ *
13+ * Hardware Connections:
14+ * - Connect the Qwiic Soil Moisture Sensor to the Qwiic connector of your development board (SparkFun Thing Plus, ReadBoard ...etc.)
15+ * If you don't have a development board with a Qwiic connector, you can purchase one at sparkfun.com
16+ * - Connect the development board to your computer using a USB cable.
17+ * - Open the Serial Monitor at a baud rate of 115200 to see the sketch output.
18+ *
819 *---------------------------------------------------------------------------------
920 */
1021
Original file line number Diff line number Diff line change 55 *
66 * SPDX-License-Identifier: MIT
77 *
8+ * This example demonstrates how to read the soil moisture sensor value and use the mositure value to control the on-board LED
9+ * flash rate. The drier the soil, the faster the LED flashes.
10+ *
11+ * Supported Sensor:
12+ * Qwiic Soil Moisture Sensor https://www.sparkfun.com/sparkfun-qwiic-soil-moisture-sensor.html
13+ *
14+ * Hardware Connections:
15+ * - Connect the Qwiic Soil Moisture Sensor to the Qwiic connector of your development board (SparkFun Thing Plus, ReadBoard ...etc.)
16+ * If you don't have a development board with a Qwiic connector, you can purchase one at sparkfun.com
17+ * - Connect the development board to your computer using a USB cable.
18+ * - Open the Serial Monitor at a baud rate of 115200 to see the sketch output.
19+ *
820 *---------------------------------------------------------------------------------
921 */
1022
@@ -19,7 +31,7 @@ SparkFunSoilMoistureSensorI2C mySoilSensor; // Create an instance of the sensor
1931// The plan:
2032// The value of the sensor has the following range:
2133// 0 = 100% wet soil (no resistance)
22- // 1024 = 0% wet soil (infinite resistance) note: the sensors ADC is 10-bit 2^10 = 1024
34+ // 1023 = 0% wet soil (infinite resistance) note: the sensors ADC is 10-bit 2^10 = 1024-1
2335//
2436// The LED will flash faster the drier the soil is. The LED will be effectively off when the soil is 100% wet.
2537//
You can’t perform that action at this time.
0 commit comments