In the Lights lesson I run into an error when trying to set the brightness of the
LogicDisplaysLED or the HoloProjectorLED.
Whenever I use the
- setLogicDisplayLeds(brightness: 255)
- setHoloProjectorLed(brightness: 255)
commands, R2D2 just beeps and shakes its head.
Did anyone manage to finish this lesson successfully?
This is the code I came up with:
func flashLights(){
setLogicDisplayLeds(brightness: 255)
setHoloProjectorLed(brightness: 255)
wait(for: 1)
setLogicDisplayLeds(brightness: 0)
setHoloProjectorLed(brightness: 0)
wait(for: 1)
}
func startMessage() {
for i in 1 ... 5 {
flashLights()
}
}