User: alciro    User
 Original    Translate to:  Deutsch  English  Français  中文  
 

microHomeLan.net

3.4.4. Manual adjustment of the LED light power LEDs

Manual control LEDs LED lamps

Manual adjustment of diodes leds connected to an analog output AO1 with pushbutton control.

This example takes full control of linear regulators for LED diodes, squeezing their ability to regulate and control through a simple switch, low cost.

Amplifier

  • 1 analog output AO1 (PowerLed) of the Unit1 connected to two LED lamps (<12V each).

Control

  • 1 digital input DI1 of the Unit1 connected to a switch, with manual dimming control.

Program

To get the complete control of an analog output AO1 and able to make a manual adjustment of the intensity of the LED, we have to handle three events of the digital input DI1.

  • Click event: the exchange is made in the state, Complement process, if this turns off the stored value, and if it is turned off.
  • Down Event: linear ramp starts from the current value of lighting, linear ramp Start process. Linear ramp up and down in a row, stopping at a value of 0 to 100%. To make two ramps, such as an up and down another, you must complete a process (up to 100%) and start it again (down to 0%), it has to run 2 times the ramp Linel process (perform two clicks).
  • Event Up: Stop the linear ramp in the current lighting and store the value, linear ramp Stop process.

The value stored in a linear ramp process is preserved while it is not revoked by another linear ramp process, when they occur Complement On or processes running on the stored value.

When performing a long press starts smooth linear ramp, when the lighting is right, release the button, it stops the ramp and store the value. When doing a short press turns on or off the LED prior stored value. To switch back lighting only has to begin the process of linear ramp holding the button, and so on.

An order comes from a home automation controller connected to the network can change the status of the LED lamp, changing their light level or off, but will not change the value stored lighting. It may happen that a central decrease the level of illumination that has seen an increase in the level of solar radiation, this order and is scheduled to be executed automatically, to revoke only have to make one-click return DI1 and lighting stored value.

Loading
copyright © 2007-2024  www.alciro.org  All rights reserved.         
Share |