mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 17:31:13 +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:
@ -52,7 +52,7 @@ add_example(GROVESCAMSample grovescam)
|
||||
add_example(GroveSlideSample grove)
|
||||
add_example(GroveSpeakerSample grovespeaker)
|
||||
add_example(GroveTempSample grove)
|
||||
add_example(GroveVDivSample grovevdiv)
|
||||
add_example(VDivSample vdiv)
|
||||
add_example(GroveWaterSample grovewater)
|
||||
add_example(GroveWFSSample grovewfs)
|
||||
add_example(GUVAS12DSample guvas12d)
|
||||
|
@ -23,14 +23,14 @@
|
||||
*/
|
||||
|
||||
//NOT TESTED!!!
|
||||
public class GroveVDivSample {
|
||||
public class VDivSample {
|
||||
private static final short gain3 = 3;
|
||||
private static final short gain10 = 10;
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
// ! [Interesting]
|
||||
// Instantiate a Grove Voltage Divider sensor on analog pin A0
|
||||
upm_grovevdiv.GroveVDiv vDiv = new upm_grovevdiv.GroveVDiv(0);
|
||||
upm_vdiv.VDiv vDiv = new upm_vdiv.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