blink_o_meter v1.0.0 BlinkOMeter.UvMeter
This module is responsible for controlling the panel meter protion of BinkOMeter.
The direct API allows for changing the level through 3 functions.
set_meter_level/1
- sets the level. Any value can be stored here, but values sent to the panel will be integers and be limited to the range of 0 to 255.set_meter_percentage/1
- sets the level thourgh percentage. So acceptable values are in the 0 to 100 range.increment_meter_level/1
- adds the sent value to the current value.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Gets the current state of the UvLevel. The values are represented as follows
Increment the current value of the UvLevel.
Sets the current value of the UvLevel within the range of 0 to 255.
Sets the current value of the UvLevel within the range of 0 to 100.
Sets the current state of the UvLevel.
Link to this section Functions
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
get_state()
Gets the current state of the UvLevel. The values are represented as follows:
- level - the value last sent in by the client, can be an integer or float and will be preserved.
- previous_level - the last level sent to the meter. This will be an integer between 0 and 255.
- gpio_pin - the gpio pin on the RPI that the meter is connected to.
- is_bound - whether or not this blinkometer instance connected to a remote instance at startup.
increment_meter_level(level)
Increment the current value of the UvLevel.
set_meter_level(level)
Sets the current value of the UvLevel within the range of 0 to 255.
set_meter_percentage(percentage)
Sets the current value of the UvLevel within the range of 0 to 100.
set_state(state)
Sets the current state of the UvLevel.