Turn off all LEDs on NAO robot

16 Views Asked by At

I am trying to turn off all the LEDs on my NAO robot in Choregraphe. I now have the following code that came with the box "Set LEDs". It switches off the LEDs for a few seconds, but then they get switched on again. I want the LEDs to keep being switched off until I press stop.

class MyClass(GeneratedClass):
    def __init__(self):
        GeneratedClass.__init__(self, False)

    def onLoad(self):
        self.leds = self.session().service("ALLeds")

    def onUnload(self):
        #~ puts code for box cleanup here
        pass

    def onInput_onSet(self):
        self.leds.fade(self.getParameter("LEDs group"), self.getParameter("Intensity (%)")/100., self.getParameter("Duration (s)"))

        self.onReady() # activate output of the box
0

There are 0 best solutions below