An Arduino connected to a breadboard with an LED and a potentiometer

This week’s lab came together without incident. The LED’s change in brightness was far from linear, though. The full range of adjustability was probably covered in the first quarter-turn of the potentiometer. Mapping the value sent to Pin 9 (via pulse width modulation) could fix this, but I wonder if it’s a flaw in the circuit or just a property of the LED.

Also, seeing the code for the PicBasic on Tom’s page about analog makes me appreciate how much boilerplate Arduino spares us.

Here’s the video:

Also, an aside: Any reason to favor the byzantine 6-hookup breadboard power configuration (left) over cleaner 4-hookup approach (right)?

Update: Just a style thing. When you’re using a voltage regulator, using six is more convenient.

An Arduino connected to a breadboardAn Arduino connected to a breadboard