Res: Add demo light sensor script

This commit is contained in:
Vicki Pfau 2023-06-20 04:18:46 -07:00
parent 1af9831fc9
commit 76e5aa7148
1 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,8 @@
local theta = 0
function readLight()
theta = math.fmod(theta + math.pi / 120, math.pi * 2)
return (math.sin(theta) + 1) * 75
end
emu:setSolarSensorCallback(readLight)