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//
Changes
Revision | Date | Who | Commit message |
---|---|---|---|
1:fb003ee6ea2b | 2017-04-11 | jehoon | use analog read() function |
0:b1e8ef4ab78b | 2015-06-23 | joon874 | riri |