Created
November 20, 2018 00:18
-
-
Save baobao/2459cb025e3994dfb5311cb8002f5f6e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
basic.forever(function () { | |
let lightLevel = input.lightLevel(); | |
if (lightLevel <= 2) { | |
// 一定の暗さになったら腕を回す | |
basic.showIcon(IconNames.Heart); | |
servos.P0.setAngle(180); | |
basic.pause(2000); | |
servos.P0.setAngle(90); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment