Wednesday, December 25, 2013

Fountain program

I expanded on the blink example and added 3 more LEDs to represent 3 more valves being turn on and off in patterns.

I also thought that the pump should pump 1/4 the amount of water when only one of the 4 valves turned on, 1/2 for 2 valves, and so on.

This requires turn the pump on and off quickly using Pulse Width Modulation feature of the arduino digital output pins.

The program set the pulse with to 100% (255) when all valve are on, and 50% (127) for 2 valves.

To represent the Pump I used one yellow LED, and the valves are all red LEDs.

No comments:

Post a Comment