Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 713 Bytes

03-blinking-leds.md

File metadata and controls

34 lines (24 loc) · 713 Bytes

Warm-up: On-board led blinking

Start Julia as root

sudo julia

Enter the following Julia commands:

write("/sys/class/leds/ACT/trigger","none")
write("/sys/class/leds/ACT/brightness","1")
write("/sys/class/leds/ACT/brightness","0")

Replace ACT by led0 for older version of Raspbery PI (drifter01 to drifter05). The first command, will take control over the green led. The second and third command switch it on and off.

Blinking leds:

filename = "/sys/class/leds/ACT/brightness";

while true;
   write(filename,"0");
   sleep(0.5);
   write(filename,"1");
   sleep(0.5);
end

Idea: What about implementing Morse code ?