1-Brief Overview

image.png

The Rotary Potentiometer Module is based on a linear rotating variable resistor with a maximum resistance of 10K Ω, with a return range of 0-255. It comes with 8 blue LED lights, with more lights on as the value increases. Can be used for motor stepless speed regulation, linear value input, etc.

2-Parameter specifications

Parameter Value/Description
operating voltage DC 5V
Interface type RJ11
Communication method WM single bus
variable resistor Rotary linear 10KΩ
Output value range 0~255
indicator light 8 blue LED lights
Rotation angle 280°

3-Programming Guide

3.1-Module Function and Graphic Programming Guide

The graphical programming platforms supported by this module include WeeeCode, Mixly-Arduino, Makecode, etc. Their graphical programming is similar and the differences are not significant.

无标题

Example of graphical programming:

image.png

3.2-Text Code Programming Guide

Arduino programming example:

include"WeELF328P.h"

WePotentiometer Potentiometer(PORT_A);

voidsetup()
{ 
Serial.begin(9600);
}
voidloop() 
{
Potentiometer.OpenLED();
Serial.print("Analog Value is: ");
Serial.println(Potentiometer.readAnalog()); 
delay(1000);
Potentiometer.CloseLED();
delay(1000);
}