mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 17:31:13 +03:00
slide: Added slide potentiometer sensor C source
Added the C source for the flex sensor with necessary changes to cmake, examples, and docs. * Renamed all files with groveslide to slide * Replaced all instances of groveslide with slide * Added C source for slide sensor * Updated all cmake files * Added C example for slide sensor * Split out slide sensor from grove library Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
@ -49,7 +49,7 @@ add_example(GroveQTouch at42qt1070)
|
||||
add_example(GroveRelaySample grove)
|
||||
add_example(GroveRotarySample grove)
|
||||
add_example(GROVESCAMSample grovescam)
|
||||
add_example(GroveSlideSample grove)
|
||||
add_example(SlideSample grove)
|
||||
add_example(GroveSpeakerSample grovespeaker)
|
||||
add_example(GroveTempSample grove)
|
||||
add_example(VDivSample vdiv)
|
||||
|
@ -22,11 +22,11 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
public class GroveSlideSample {
|
||||
public class SlideSample {
|
||||
public static void main (String args[]) throws InterruptedException {
|
||||
//! [Interesting]
|
||||
// Instantiate new grove slide potentiometer on analog pin A0
|
||||
upm_grove.GroveSlide slide = new upm_grove.GroveSlide(0);
|
||||
upm_grove.Slide slide = new upm_grove.Slide(0);
|
||||
|
||||
while (true) {
|
||||
float raw_value = slide.raw_value();
|
Reference in New Issue
Block a user