Archive for 13 Sep 2011

PWM (Part 4)

Part 1, 2, 3, 4 Here is a simple sketch which examplifies the use of the PlainPWM library. Be carefully at declaring port and pin properly. The rest is really easy: initialize the PWM object with the port name, pin index, base frequency and default duty cycle ratio. The loop will dim the led up and down endlessly. /* […]