mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-07 16:59:18 +00:00
FRM_RGB: update perl-doc
git-svn-id: https://svn.fhem.de/fhem/trunk@4173 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b85e5211ed
commit
da3e1b283d
@ -270,35 +270,66 @@ FRM_RGB_Attr($$$$) {
|
||||
=pod
|
||||
=begin html
|
||||
|
||||
<a name="FRM_PWM"></a>
|
||||
<h3>FRM_PWM</h3>
|
||||
<a name="FRM_RGB"></a>
|
||||
<h3>FRM_RGB</h3>
|
||||
<ul>
|
||||
represents a pin of an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a>
|
||||
configured for analog output.<br>
|
||||
The value set will be output by the specified pin as a pulse-width-modulated signal.<br>
|
||||
allows to drive LED-controllers and other multichannel-devices that use PWM as input by an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a>
|
||||
<br>
|
||||
The value set will be output by the specified pins as pulse-width-modulated signals.<br>
|
||||
Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
|
||||
|
||||
<a name="FRM_PWMdefine"></a>
|
||||
<a name="FRM_RGBdefine"></a>
|
||||
<b>Define</b>
|
||||
<ul>
|
||||
<code>define <name> FRM_PWM <pin></code> <br>
|
||||
Defines the FRM_PWM device. <pin>> is the arduino-pin to use.
|
||||
<code>define <name> FRM_PWM <pin> <pin> <pin> [pin...]</code> <br>
|
||||
Defines the FRM_RGB device. <pin>> are the arduino-pin to use.<br>
|
||||
For rgb-controlled devices first pin drives red, second pin green and third pin blue.
|
||||
</ul>
|
||||
|
||||
<br>
|
||||
<a name="FRM_PWMset"></a>
|
||||
<a name="FRM_RGBset"></a>
|
||||
<b>Set</b><br>
|
||||
<ul>
|
||||
<code>set <name> value <value></code><br>
|
||||
sets the pulse-width of the signal that is output on the configured arduino pin<br>
|
||||
Range is from 0 to 255 (see <a href="http://arduino.cc/en/Reference/AnalogWrite">analogWrite()</a> for details)
|
||||
</ul>
|
||||
<a name="FRM_PWMget"></a>
|
||||
<code>set <name> on</code><br>
|
||||
sets the pulse-width of all configured pins to 100%</ul>
|
||||
<ul>
|
||||
<code>set <name> off</code><br>
|
||||
sets the pulse-width of all configured pins to 0%</ul>
|
||||
<ul>
|
||||
<code>set <name> toggle</code><br>
|
||||
toggles in between the last dimmed value, 0% and 100%. If no dimmed value was set before defaults to pulsewidth 50% on all channels</ul>
|
||||
<ul>
|
||||
<code>set <name> rgb <value></code><br>
|
||||
sets the pulse-width of all channels at once. Also sets the value toggle can switch to<br>
|
||||
Value is encoded as hex-string, 2-digigs per channel (e.g. FFFFFF for reguler rgb)</ul>
|
||||
<ul>
|
||||
<code>set <name> pct <value></code><br>
|
||||
dims all channels at once while leving the ratio in between the channels unaltered.<br>
|
||||
Range is 0-100 ('pct' stands for 'percent')</ul>
|
||||
<ul>
|
||||
<code>set <name> dimUp</code><br>
|
||||
dims all channels up by 10%</ul>
|
||||
<ul>
|
||||
<code>set <name> dimDown</code><br>
|
||||
dims all channels down by 10%</ul>
|
||||
|
||||
<a name="FRM_RGBget"></a>
|
||||
<b>Get</b><br>
|
||||
<ul>
|
||||
N/A
|
||||
<code>get <h;name> rgb</code><br>
|
||||
returns the values set for all channels. Format is hex, 2 nybbles per channel.
|
||||
</ul>
|
||||
<ul>
|
||||
<code>get <h;name> RGB</code><br>
|
||||
returns the values set for all channels in normalized format. Format is hex, 2 nybbles per channel.
|
||||
Values are scaled such that the channel with the highest value is set to FF. The real values are calculated
|
||||
by multipying each byte with the value of 'pct'.
|
||||
</ul>
|
||||
<ul>
|
||||
<code>get <h;name> pct</code><br>
|
||||
returns the value of the channel with the highest value scaled to the range of 0-100 (percent).
|
||||
</ul><br>
|
||||
<a name="FRM_PWMattr"></a>
|
||||
<a name="FRM_RGBattr"></a>
|
||||
<b>Attributes</b><br>
|
||||
<ul>
|
||||
<li>restoreOnStartup <on|off></li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user