mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 09:21:12 +03:00
vdiv: Added vdiv C source.
Multiple changes related to building the vdiv c source w/c example. * Renamed GroveVdiv to vdiv (all cases) throughout source, examples, directory names, and documentation. * Added C source. * Tested C sensor code on edison * Updated CMakeLists.txt for examples-c to build from <sensorname>-c. This was a small change to get c examples to build for sensors in which the C++ does NOT wrap the C. * Added C example for vdiv. Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
@ -146,7 +146,7 @@ add_example (grovemoisture)
|
||||
add_example (groveehr)
|
||||
add_example (ta12200)
|
||||
add_example (grovelinefinder)
|
||||
add_example (grovevdiv)
|
||||
add_example (vdiv)
|
||||
add_example (grovewater)
|
||||
add_example (guvas12d)
|
||||
add_example (mpr121)
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <unistd.h>
|
||||
#include <iostream>
|
||||
#include <signal.h>
|
||||
#include "grovevdiv.hpp"
|
||||
#include "vdiv.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -44,7 +44,7 @@ int main ()
|
||||
|
||||
//! [Interesting]
|
||||
// Instantiate a Grove Voltage Divider sensor on analog pin A0
|
||||
upm::GroveVDiv* vDiv = new upm::GroveVDiv(0);
|
||||
upm::VDiv* vDiv = new upm::VDiv(0);
|
||||
|
||||
// collect data and output measured voltage according to the setting
|
||||
// of the scaling switch (3 or 10)
|
Reference in New Issue
Block a user