First commands with PiFace Control And Display

With your PiFace CAD installed, fitted and tested, it is time to control PiFace CAD through Python

Type the following python code in either a python shell or as a python program.
import pifacecad as p
cad = p.PiFaceCAD()
This will import and initialise the PiFace CAD module.

Now try turning the LCD backlight on
And off

Writing to the screen is just as simple.
cad.lcd.write("Your text")

To remove this text enter the following

Now have a go at reading the buttons
If you are not touching the button it should return 0

Now hold the fifth button (the one set slightly away from the other four) down and run the above command again, it should now return 1

View PiFace CAD's full documentation for more examples and commands.