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:
Noel Eck
2016-09-09 17:21:03 -07:00
parent e2bec11c23
commit e58c651b67
24 changed files with 550 additions and 51 deletions

View File

@ -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)

View File

@ -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();