mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 01:11:10 +03:00
Moisture: Add C Src and Example
Changed from GroveMoisture. Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
This commit is contained in:
@ -142,7 +142,7 @@ add_example (adc121c021)
|
||||
add_example (ds1307)
|
||||
add_example (a110x)
|
||||
add_example (gp2y0a)
|
||||
add_example (grovemoisture)
|
||||
add_example (moisture)
|
||||
add_example (groveehr)
|
||||
add_example (ta12200)
|
||||
add_example (grovelinefinder)
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <unistd.h>
|
||||
#include <iostream>
|
||||
#include <signal.h>
|
||||
#include "grovemoisture.hpp"
|
||||
#include "moisture.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -43,8 +43,8 @@ int main ()
|
||||
signal(SIGINT, sig_handler);
|
||||
|
||||
//! [Interesting]
|
||||
// Instantiate a Grove Moisture sensor on analog pin A0
|
||||
upm::GroveMoisture* moisture = new upm::GroveMoisture(0);
|
||||
// Instantiate a Moisture sensor on analog pin A0
|
||||
upm::Moisture* moisture = new upm::Moisture(0);
|
||||
|
||||
// Values (approximate):
|
||||
// 0-300, sensor in air or dry soil
|
Reference in New Issue
Block a user