Electronic Building Block Rotary Potentiometer Analog Knob Module
...See More
PRIVACY PROTECTED
SECURE CHECKOUT
Electronic Building Block Rotary Potentiometer Analog Knob Module
Availability:
In Stock
|
FREE Shipping on Orders Over $20
ships worldwide |
$2.92
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);
}
Material: PCB
Package weight: 0.033 kg
Package Contents: 1X module
CUSTOMER SATISFACTION

We are doing our best to provide excellent shopping experience at HitMint.com. We made it easy to track, return or contact our outstanding customer service
PRIVACY PROTECTED

We keep our customer's personal information safe and do not sell it to any third- party company
SECURE CHECKOUT

All transactions made through a secure server where the data exchange is encrypted with SSL certificate