For reasons not completely known to myself, I bought a raspberry pi recently. Here’s a first circuit, a collaboration between myself and Lance. Lance added a switch between the GPIO output port and the LED, so that the port has to be enabled by both software, and by the physical switch
I tried two different ways of controlling the GPIO, the first using a command line tool:
#!/bin/bash # https://projects.drogon.net/raspberry-pi/gpio-examples/tux-crossing/gpio-examples-1-a-single-led/ gpio mode 0 out gpio write 0 1 sleep 5 gpio write 0 0
and the second with a bit of python code: