Taper Rotary Potentiometer B10K (B10K) [S060]
https://www.youtube.com/watch?v=VMQ_LH0NPps
*GitHub : https://github.com/rdiot/rdiot-s060.git
* Specs
Manufacturer: ALPHA
Manufacturer Part No: B10K OHM 17mm
Comes with Dust Seal
Specifications
Adjustment Type: Top Adjustment
Power: 1/2W
Resistance: 10K OHM OHMS
Type: Linear
Type B
Features
Knurled Shaft
Suits Most Standard knobs
Shaft Diameter: 6mm
Shaft Length: 10mm
Mounting Hole: 7.5mm
Base Diameter: 16mm
* Contents
- Connect
Left - 5V
Middle - A0 (OUT)
Right - GND
- Key Code
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4); // LCD2004
int potPin = A0;
int val;
void setup()
{
lcd.init(); // initialize the lcd
lcd.backlight();
lcd.print("start LCD2004");
//pinMode(potPin, INPUT);
delay(1000);
lcd.clear();
}
void loop()
{
lcd.setCursor(0,0);
lcd.print("S060:B10K");
val = analogRead(potPin);
lcd.setCursor(0,1);
lcd.print("analog=" + (String)val + " " );
val = map(val, 0, 1021, 100, 1);
lcd.setCursor(0,2);
lcd.print("val1~100=" + (String)val + " " );
delay(10);
}
'2) Sensor > Potentiometer' 카테고리의 다른 글
3362P 10K Trimmer Potentiometer (3362P-10K) [S091] (0) | 2016.09.18 |
---|---|
3296W Multiturn Trimmer Potentiometer (3296W) [S089] (0) | 2016.09.18 |
Linear Potentiometer B1K~B1M (B1K~B1M) [S070] (0) | 2016.09.18 |
Slide Pot 10K Module [S061] (0) | 2016.09.18 |
Amp Pot B5K (B5K) [S027] (0) | 2016.09.18 |