Now we’re ready to begin. Put the mouse cursor on the line of the programwhere we create the turtle screen, and press the F4 key. This will run the Pythonprogram up to, but not including, the line where we have the cursor. Our programwill “break” now, and provide a highlight on the next line to be executed, something like this:
I did our blinken-bar led demo, but with a new twist. We’ve just published the first version of a library for the PCF8591, which is the chip at the heart of our I2C analogue board. We’ve hooked one up to a photocell and written a little Python program to display the light level on a Bar LED. I have to admit to a childish pleasure in seeing the LED respond as I wave my hand above the board.
Make sure you have started Idle so the current directory is yourPython program directory (for instancein Windows with the downloaded shortcut to Idle).