Moisture Sensor example for WIZwiki-W7500
Dependencies: mbed
Prerequisite
WIZwiki-W7500 have a SD card slot that can operate in its SPI interface.
This example is to allow SD card File System on WIZwiki-W7500 and updating MP3 files from server to SD card via FTP protocol.
To implement this function, you need a Platform board and Moisture Sensor Module Below are what we used.
- WIZwiki-W7500 from WIZnet (Platform board and Ethernet I/F board)
- Mosisture sensor module
Hardware Configuration
WIZwiki-W7500 Pin map
Moisture Sensor module
VCC, GND, (Analog or Digital pin)
To get sensing data of moisture sensor all you will need is to connect the VCC and GND pins to WIZwiki W7500. Then an Analog pin or a Digital pin of WIZwiki W7500 will receive sensing data from each pin on Moisture sensor module.
Analog pin on WIZwiki-W7100 is for reading from Moisture sensor module. This example is using A0 pin.
Software
Analog Pin Initialization
main.cpp
AnalogIn moisture(A0);
Read Moisture sensing data using Analog Read
main.cpp
value = moisture.read(); pc.printf("Moisture reading is %2.2f\n", value);
Caution
This example can read Moisture sensing data//
mbed.bld@1:fb003ee6ea2b, 2017-04-11 (annotated)
- Committer:
- jehoon
- Date:
- Tue Apr 11 04:50:44 2017 +0000
- Revision:
- 1:fb003ee6ea2b
- Parent:
- 0:b1e8ef4ab78b
use analog read() function
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jehoon | 1:fb003ee6ea2b | 1 | https://mbed.org/users/mbed_official/code/mbed/builds/856d2700e60b |