5% OFF Over $19, Code: Elephant5; 10% OFF Over $59, Code: Elephant10



EASY plug Ultimate Starter Learning Kit Project 11: Slide Position

Posted by Fiona Su on

Overview
This lesson you will learn how to use slide potentiometer to control the LED brightness and servo rotation.
Component Required

  • EASY plug control board*1
  • EASY plug slide potentiometer *1
  • EASY plug LED module*1
  • Servo motor *1
  • RJ11 cable*2
  • USB cable*1

Component Introduction
The EASY plug slide potentiometer uses high quality sliding appliances for stable and reliable performance. It is a dual analog output that outputs a 0-VCC analog voltage signal. The module pins are extended into Registered jack, so you can easily connect it to EASY Plug control board using a RJ11 cable.
There are 6 pad interfaces on the module. So you can solder two 3pin headers with a pitch of 2.54mm on the module.
It can be used to connect with other MCUs. The signal terminal outputs two analog values. The sum of the two analog values is 1023.
Connect It Up
Connect the EASY Plug Slide Potentiometer module to control board using an RJ11 cable.

thumb

Upload the Code

thumb

What You Should See

thumb

After uploading the code, open the serial monitor and set the baud rate to 9600;
you should be able to see the analog value of analog pin A6,A7. If slide the slider, the value will change.

thumb

Controlling LED Brightness
Except from reading the analog value of slide potentiometer, you are able to use the slide potentiometer to control the brightness of LED.
Hookup Guide

thumb

Test Code

thumb

What You Should See
After uploading the code, slide the potentiometer, the brightness of LED will change.
Controlling Servo Angle
Hookup Guide

thumb

Test Code

thumb

What You Should See
After uploading the code, slide the potentiometer, the servo motor will rotate to a certain angle.

All Tutorials

Buy >> EASY plug Ultimate Starter Learning Kit 

0 comments

Leave a comment

Please note, comments must be approved before they are published