PUB Main dira~~ outa~
If we look at the LameStation’s board layout, we’ll find that there’s a single LED we can toggle. This was designed into the board as an easy way for the LameStation to do _ something _ . As you might have gathered putting it together, getting a board to do _ something _ can be half the battle.
All we have to do to turn on this light is toggle the microcontroller pin it is connected to. On this board, it’s connected to pin 24. To turn on a pin, two steps are required:
DIRAcommand to enable the pin as an output.
OUTAcommand to set the pin to 0V.
So here’s how you do it:
~~ characters set the pin to high and low, respectively.
One thing you’ll notice: if you run it as is, you’ll never see the light come on. This is because as soon as your commands are finished, the Propeller has no more code to run so it decides to shut down. If you want your Propeller to stay awake, you have to keep it busy.
REPEAT command to keep the LameStation in an infinite loop.
PUB Main dira~~ outa~ repeat
Now both LEDs on the LameStation should be active.