Linear Potentiometer B1K~B1M (B1K~B1M) [S070]
https://www.youtube.com/watch?v=XWHGxC1BT80
*GitHub : https://github.com/rdiot/rdiot-s070.git
* Contents
- Connect
Left ----- D8
Middle ----- LED +
LED (+) ----- Potentiometer Middle
LED (-) ----- GND
- Key Code
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4); // LCD2004
int pin=8;
void setup()
{
lcd.init(); // initialize the lcd
lcd.backlight();
lcd.print("start LCD2004");
pinMode(pin, OUTPUT);
digitalWrite(pin,HIGH);
delay(1000);
lcd.clear();
}
void loop()
{
lcd.setCursor(0,0);
lcd.print("S070:B1K~B1M");
lcd.setCursor(0,1);
lcd.print("analog=" + (String)analogRead(A0) + " ");
}
'2) Sensor > Potentiometer' 카테고리의 다른 글
3362P 10K Trimmer Potentiometer (3362P-10K) [S091] (0) | 2016.09.18 |
---|---|
3296W Multiturn Trimmer Potentiometer (3296W) [S089] (0) | 2016.09.18 |
Slide Pot 10K Module [S061] (0) | 2016.09.18 |
Taper Rotary Potentiometer B10K (B10K) [S060] (0) | 2016.09.18 |
Amp Pot B5K (B5K) [S027] (0) | 2016.09.18 |