Hardware Reference
In-Depth Information
Engage thrusters
In order to get started with programming in the Raspberry Pi, we will launch Python IDLE3
from the desktop.
Launching IDLE3 from the desktop
1.
Now, we have to get started with programming the LED blinking example in IDLE3.
2.
This LED blinking sample code is as follows:
from time import sleep
from quick2wire.gpio import pins, Out
with pins.pin(7, direction=Out) as out_pin:
while True:
out_pin.value = 1
sleep(1)
out_pin.value = 0
sleep(1)
out_pin.unexport()
 
Search WWH ::




Custom Search