in digit_interface/digit.py [0:0]
def set_intensity(self, intensity: int) -> int:
"""
Sets all LEDs to specific intensity, this is a global control.
:param intensity: Value between 0 and 15 where 0 is all LEDs off and 15 all
LEDS full intensity
:return: Returns the set intensity
"""
if self.revision < 200:
# Deprecated version 1.01 (1b) is not supported
intensity = int(intensity / self.__LIGHTING_SCALER)
logger.warn(
"You are using a previous version of the firmware "
"which does not support independent RGB control, update your DIGIT firmware."
)
self.intensity = self.set_intensity_rgb(intensity, intensity, intensity)
return self.intensity