Testing your project

Click the play button on the emulator. It will scroll "255". If you click and hold leg 0, the emulator will start scrolling 0 instead. This shows us the highest and lowest value our analogue leg can read.

Load your program onto your CodeBug and start turning the potentiometer knob, the value scrolling will change to numbers within the 0-255 range.

With the dial turned anticlockwise as far as it can, CodeBug should be scrolling "0" and clockwise as far as it can should scroll “255”. If these are swapped, try swapping over the ground and power wires to the legs on the potentiometer.


Activities with this step

Back to top