Datasheet
IDUINO for Maker’s life
www.openplatform.cc
GND
Ground
3.Example
Here is a example to control the intensity of LED13. Rotate this module, the LED13
will be lighter or darker.
The connection as below:
Example code :
******Code begin******
const int analogInPin = A0; // Analog input pin that the potentiometer
is attached to
const int analogOutPin = 13; // Analog output pin that the LED is attached
int sensorValue = 0; // value read from the pot
int outputValue = 0; // value output to the PWM (analog out)
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
}
void loop() {
// read the analog in value:
sensorValue = analogRead(analogInPin);