Soldering

- Use around 400-450 degrees celsius.
- Give heat to the wire or pin AND the hole.

Potentiometer controlling LED brightness Arduino code


int potPin = A2;    // select the ANALOG input pin for the potentiometer
int val = 0;       // variable to store the value coming from the sensor
int ledPin = 11;
int brightness = 255;

void setup() {
  Serial.begin( 9600 ); // Start Serial
  pinMode( potPin, INPUT );  // declare the ledPin as an OUTPUT
  pinMode( ledPin, OUTPUT );
}

void loop() {
  val = analogRead( potPin );    // read the value from the sensor
  Serial.print( "Potentiometer: " );
  Serial.println( val ); // Write to Serial

  brightness = map( val, 0, 1023, 0, 255 ); // Scale analog potentiometer values to LED values
  Serial.print( "Brightness: " );
  Serial.println( brightness );
  analogWrite( ledPin, brightness );
}

Links to equipment

Proto-Screwshield (Wingshield)

Cabinet in metal

Battery cabinet 4 x AA

Battery cable for 9V battery

Proto shield

Screw terminals for Arduino

Screw terminal