I'm working on a light puls code, i want the light to go from value dark (0) then increase to bright (255).
I have been trying to use a "for" to get this to work but i am really unsure. The code starts with the light on 0, then i want to increase it to 255, then have a pause of 0.50 seconds then repeat
basic.forever(function () {
led.setBrightness(input.lightLevel())
for led.setBrightness >255
basic.showIcon(IconNames.Heart)
basic.pause(500)
})