background image

o

 

Similarly, you can use the slide potentiometer to vary the speed of your 

Mini 

Fan

 or the frequency with which your 

Grove - Buzzer

 module sounds 

o

 

The slide potentiometer can also be used as an ON/OFF switch for any circuit. 
Take the slider to the Vcc position to switch it ON and move it down to GND to 
switch OFF a circuit. 

In terms of choosing a power module, you can use either the 

Grove - USB 

Power

 module or the 

Grove - DC Jack Power

module for building standalone Grove 

circuits. 

With 

Arduino

 

As a Voltage Divider 

Follow these simple steps to make the slide potentiometer module function as a 
voltage divider: 

1.  When using the module in conjunction with an 

Arduino

 or a 

Seeeduino

, use 

the 

Grove - Base Shield

 and connect the Grove - Slide Potentiometer module 

to the shield using a designated Grove Interface (e.g., Analog Port 0 as shown 
below):  

 

 

2.  Connect the board to PC using USB cable 
3.  Upload the following sample sketch: 

int

 adcPin = A0; 

// select the input pin for the potentiometer

 

int

 ledPin = A1; 

// select the pin for the LED

 

int

 adcIn = 

0

;   

// variable to store the value coming from the sensor

 

void

 

setup

() 


    

Serial

.

begin

(

9600

); 

// init serial to 9600b/s

 

    

pinMode

(ledPin, 

OUTPUT

); 

// set ledPin to OUTPUT

 

    

Serial

.

println

(

"Sliding Potentiometer Test Code!!"

); 

void

 

loop

() 


    

// read the value from the sensor:

 

Содержание Slide Potentiometer

Страница 1: ...es through a standard 4 Pin Grove Cable Three of the pins are connected to OUT Pin 1 Vcc Pin 3 and GND Pin 4 while the fourth pin Pin 2 is connected to a on board green indicator LED The LED is used t...

Страница 2: ...cuit you may use a range of User Interface modules Grove Red LED Grove LED String Light Grove Mini Fan Grove Buzzer Grove Recorder etc 2 Power up the circuit when complete 3 The slide potentiometer mo...

Страница 3: ...le steps to make the slide potentiometer module function as a voltage divider 1 When using the module in conjunction with an Arduino or a Seeeduino use the Grove Base Shield and connect the Grove Slid...

Страница 4: ...Slide Potentiometer can be an effective Human Interface Device HID and can be used for example in the radio controller of a Radio Controlled toy car The picture below shows two Slide Potentiometers on...

Страница 5: ...vePi Software Python o To see the code nano grove_slide_potentiometer py Ctrl x to exit import time import grovepi Connect the Grove Slide Potentiometer to analog port A0 OUT LED VCC GND slide 0 pin 1...

Страница 6: ...eate a project with it Recipe Community is a place which gathers a lot of amazing projects with step by step tutorials Makers in the community have made a lot of awesome projects with the Grove Slide...

Страница 7: ...noBasics in the Recipe community this guys must be born with a musical turn of mind after the Arduino BoomBox once again he made this Arduino BeatBox with some basic Grove components which really impr...

Отзывы: