


—— Best Sellers ——
1 2 3
-
Ezonetronics RM - CT0008 7 inch 1 Din Re...
$166.67
-
BOER High-end Ping Pong Racket Table Ten...
$14.45
-
SONOFF CD100S Door Window Sensor Wireles...
$3.55
-
BlackBerry KEY2 4G Smartphone Snapdragon...
$831.74
-
OUKITEL U16 Max 4G Phablet...
$160.97
Recommend Products
More Categories :

- JOYO JT - 53 LED Digital Chromatic Tuner for Electronic Acoustic Guitar
- QS QS5013 2.5 Channel RC Helicopter with Gyroscope Infrared Function
- MPOW DS - D6 Waterproof Fitness Tracker Smart Bracelet Heart Rate Sleep Monitor for iOS Android System BLACK
- Rikomagic RKM MK22 TV Box Amlogic S912 Octa Core Android 6.0 2.4G + 5G Dual Band WiFi Bluetooth 4.0 3G DDR3 RAM 32G eMMC ROM
- AEC
- ALLDOCUBE
- EZCast
- Jumper
- Junsun
- Maxsun
- Mirascreen
- XDUOO
- OUKITEL
- View More Brands
Electronic Building Block Rotary Potentiometer Analog Knob Module
Package weight: 0.033 kg
Package size: 6.00 x 6.00 x 1.00 cm / 2.36 x 2.36 x 0.39 inches
Details
The DEMO
Connect the S port of the rotating potentiometer electronic block to the end A0 on the Arduino board and use the following procedure to read its analog value. Set the brightness and darkness of LED by simulation value.
Const int led = 9; // the pin that the LED is attached to
Int brightness = 0; // how bright the LED is
Void setup () {
// declare pin 9 to be an output:
PinMode (led, the OUTPUT);
}
Void loop () {
Brightness = analogRead (A0); //use A0 to read the electrical signal
Brightness = map (brightness, 0, 1023, 0, 255);
/ / set the brightness of the pin 9:
AnalogWrite (led, brightness);
}
Connect the S port of the rotating potentiometer electronic block to the end A0 on the Arduino board and use the following procedure to read its analog value. Set the brightness and darkness of LED by simulation value.
Const int led = 9; // the pin that the LED is attached to
Int brightness = 0; // how bright the LED is
Void setup () {
// declare pin 9 to be an output:
PinMode (led, the OUTPUT);
}
Void loop () {
Brightness = analogRead (A0); //use A0 to read the electrical signal
Brightness = map (brightness, 0, 1023, 0, 255);
/ / set the brightness of the pin 9:
AnalogWrite (led, brightness);
}
Brand: NO
Material: PCB
Material: PCB
0.010
Product size: 3.00 x 2.50 x 2.00 cm / 1.18 x 0.98 x 0.79 inches Package weight: 0.033 kg
Package size: 6.00 x 6.00 x 1.00 cm / 2.36 x 2.36 x 0.39 inches
Package Contents: 1X module
Tell us what you think about this item!
Tell us what you think about this item!