HomeTurtlegraficsGPanelRobotics WebTigerPython |
Python - Online |
Deutsch English |
YOU LEARN HERE... |
how to switch on the four RGB LEDs on the CalliMk board in different colours. |
EXAMPLES |
Program: from callimk import * rgbLED(200, 0, 0) delay(2000) rgbLED(0, 200, 0) delay(2000) rgbLED(0, 0, 200) delay(2000) rgbLED(255, 0, 255) delay(2000) rgbLED(0, 0, 0)
Program: from callimk import * g = 10 while g <= 255: rgbLED(0, g, 0) delay(1000) g += 10 rgbLED(255, 0, 0) delay(1000) rgbLED(0, 0, 0)
Program: from callimk import * repeat 2: rgbLED(255, 0, 0) leftArc(0.2) delay(5000) rgbLED(0, 255, 0) rightArc(0.2) delay(5000) stop() rgbLED(0, 0, 0) |
REMEMBER... |
With the command rgbLED(r, g, b), where r, g, b are numbers between 0 and 255, the four RGB LEDs are switched on and remain lit until another colour is switched on or the LEDs are switched off with the command rgbLEDs(0, 0, 0). |
TO SOLVE BY YOURSELF |
|
|
![]() |
![]() |
![]() |