One way I am exploring LightLogo is by programming designs that form a narrative. Erik Nauman programmed an excellent example of storytelling with LightLogo that you should share with every Language Arts or English Literature teacher for its inventiveness and potential to integrate STEAM concepts in your learning environment.
My LightLogo project tells the story of light on Lopez Island over a day, from sunrise to a partly cloudy day to sunset and the stars coming out at night.
This LightLogo project is composed of small procedures that are combined to create the master startup procedure. This type of programming, described in Dr. Seymour Papert's Mindstorms as "systematic procedures" (175), encourages the creation of "very simple modules [that] can be put together to produce complex results" (169).
Here is the startup procedure.
The newsunrise procedure cycles through a series of colors. This was the first procedure where I used let and make, after Michael Tempel clarified their use.to startuploop [htnewsunrisesetpos 0strepeat 24 [sunwait 50]all blue wait random 1000 1750repeat random 2 10 [cloudall blue wait random 200 500]newnewsunsetrepeat 18 [star]]end
to newsunrise
ht
setbrightness 0
let [num 0]
let [morn 4]
all :num
repeat 20 [
all :num
setbrightness :morn
wait 500
make "num :num + 3
make "morn :morn + 1]
end
Next, the sun procedure is repeated 24 times (one for each neopixel) with a brief pause between repetitions.
to sunsetc yellowhtfd 1end
Once the sun rises, the day progresses. Overhead, clouds pass. There is randomness built into the cloud procedure, so some days are less cloudy than others.
to cloudsetpos random 0 24setc whitesetbrightness 20stpdrepeat random 5 15 [fd 1 wait random 100 250]htend
The newnewsunset procedure reverses the sunrise procedure and fades out.
to newnewsunsethtsetbrightness 20all 72let [num 72]repeat 24 [all :numwait 500make "num :num - 3]let [light 20]repeat 20 [setbrightness :lightmake "light :light - 1all 0wait 100]end
The stars rise in random places and in random colors and brightness.
to starsetpos random 0 24setc random 40 90setbrightness random 5 30htstamprepeat 4 [setc color + 5]wait random 1000 5000end
The startup procedure repeats. Each day is slightly different in regards to the number of clouds and the number of stars.
LightLogo is an inventive way to explore narrative through patterns of light. Pattern can be simple or complex, random or explicitly programmed. Share your LightLogo procedures and narratives!
Works cited:
Paper, Seymour (1993). Mindstorms Children, Computers, and Powerful Ideas. New York: Basic Books.
Comments