basic.showIcon(IconNames.Happy) basic.pause(2000) basic.forever(function () { basic.showIcon(IconNames.Heart) pins.digitalWritePin(DigitalPin.P0, 1) basic.pause(2000) basic.showIcon(IconNames.SmallHeart) pins.digitalWritePin(DigitalPin.P0, 0) basic.pause(2000) })