FLIPSTER
STEAMpunks WIKI
Join The Parade, New South Wales - Ph:+61-2-1234-5678

Coding: Raspberry Pi

In the introductory challenge, we are going to learn how to use the turtle library from the Python programming language to code some simple games.

Later, we will use Python code to program a real-world light show (and a lot more) for our Living World project.

Image: Introducing Trinket - A Simple On-line Coding Emulator

Trinket is a browser-based, an all-in-one coding environment designed for education. Teachers and students use trinket to code during class.

To enable 24/7 access from anywhere, students may create a free account on the Trinket website to save their work.

Getting Started

Learn how to make a dart board and digital darts:

Learn how to use code to program a turtle:

Learn how to use code to decorate a tree:

Extension - Race the turtles:

Do plants and animals 'do social'?


Light Detector

Sense Hat Module

The Sense HAT is an add-on board for the Raspberry Pi which was made especially for a space mission with British ESA Astronaut Tim Peake for Astro Pi. It's a great piece of hardware, very handy for data logging, science experiments, environmental analysis, games and more. It comes with a Python library making it work out-of-the-box. Read more...

The Sense HAT has many sensors, including magnetic field, position, movement, temperature, pressure and humidity, and can change its behaviour according to the values they report. The Sense HAT emulator has sliders you can move to change these values, so you can test how your code responds to environmental variables.

Every student will have access access to their own, personal Trinket Sense-Hat Emulator.

Trinket - Sense Hat EmulatorDesktop Sense-emu


In case you do not want to use an internet-based emulator, there is an optional free desktop version.

Code written in the emulator is directly portable to a physical Raspberry Pi and Sense HAT without modification. This means students can now develop and test programs using the movement sensors and other modules from any internet-connected computer, anywhere in the world.

    • Use basic programming constructs to create simple programs
    • Use basic digital, analogue, and electromechanical components


4 Channel Light Show Controller Device

Using the skills developed through the above exercises, students will learn how to program a device that will be used to control a lighting sequence of eventsi at school and later, at the Powerhouse Museum.

IRF 540 module - 4 Channel Opto Isolated DC Switch


MOSFET's have good switching characteristics and are widely used to control almost any DC load. This 4 channel IRF540 MOSFET is perfect for switching DC loads up to 10A. The module is optoisolated - note that the GROUND connections are in common so there is not complete isolation. The module is basically a “Solid-State Relay” for DC. Up to 4 individually controllable loads may be connected to the (+) and (-) switched outputs, all fed from a common power rail. Being a low side switch, when the switch is on, it connects the load (-) terminal to ground.

  • Max Control Voltage (signal) : 6V
  • LED indicator for each channel
  • Chipset : IRF540
  • Opto Isolator used : PS2801-4
  • Max Switch Current: 10A (absolute max 33A with heatsink)
  • Max Switch Voltage: 100V


 
 
2018/living-world/beachcombers/raspberry-pi/home.txt · Last modified: 10/07/2019/ 15:00 (external edit)