Let’s make the JeeNode Zero do some simple things. Like blinking LEDs in a continuous loop:
The code for this was actually written step by step, and later saved in a file called ex/leds.fs:
forgetram \ configure one pin as push-pull output : out ( pin -- ) OMODE-PP swap io-mode! ; \ configure all the LED pins as outputs : setup PA0 out PA1 out PA2 out PA3 out PA4 out PA5 out ; \ turn one pin on for 100 milliseconds : blip ( pin -- ) dup ios!
↧