Activity Notes

This is the first activity of the Raspberry Pi Worksheets Series.

This activity is designed for students who have never programmed. as mentioned before, the worksheets are not an attempt to teach electronic. We merely use the flexibility of the Raspberry Pi to make the programs more interactive and interesting. Also, some teacher guidance might be needed.

For the Teacher

This activity should take about one hour to complete.

As an option, you could prepare in advance the breadboards with the LED wiring for the students ready to go.

Aim

The student can create a simple Python program using variables, print messages, GPIO assignments and imported modules.

Objectives

By the end of the activity the student should be able to:

  • assign string values to a variable

  • import the module RPi.GPIO as IO

  • import one method from a module

  • set the GPIO number system using IO.setmode(GPIO.BOARD)

  • setup GPIO pins as output for LED

  • pause the program for a given number of seconds.

  • use the print() function to print a simple message on the screen

  • reset the Pi to default GPIO pin settings

Resources

Last updated

Was this helpful?