Skip to content

romilly/explorer-hat-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Examples for Explorer Hat Tricks

Warning

The examples in this repository rely on the Pimoroni library for the Explorer Hat. I believe that the library will need to be updated for the Raspberry Pi 5 and the latest version of the Operating SYstem.

As soon as I have any information about the timescale for the update I will share it here and on X.

If you're using an earlier model of the Pi, and are not using the latest version of the Operating system, everything here should work.

ko-fi

Disclaimer: I have been a follower and customer of Pimoroni for years, but I have no official connection with them.

Please don't ask them for support in relation to this code!

What this repository contains

These are projects from Explorer Hat Tricks, an ebook about the Pimoroni Explorer Hat Pro which you can buy on Leanpub. That means you get a 40-day no-quibble money back guarantee).

Traffic Lights Example

Wiring diagram

Traffic Lights

What you will need

  1. A Raspberry Pi model zero/zero W (with headers), 2B+, 3B, 3B+ or 4B running Raspberry Pi OS.

  2. A Pimoroni Explorer HAT Pro. You can run some of the projects with the original Explorer HAT or the Explorer pHAT.

  3. The parts from a Pimoroni Explorer Hat Parts kit

  4. Optionally, an LDR (Light dependent resistor)

I'll add wiring diagrams and README files to this repository as time permits.

Installation

This code has been tested using python3.

  1. Install Pimoroni's Explorer Hat Library using these instructions
  2. Clone this repository or download and unzip into a directory of your choice.

Using the examples

  1. Navigate to the example or project you want to run
  2. Wire up the example.
  3. Run the relevant script.

For instance, to run the traffic light project once you have wired it up, open a terminal window, change to the relevant directory and run python3 traffic-lights-01.py

Use Ctrl-C to quit the example.

The console should look like this:

Terminal session

Index to examples

A work in progress.

The code for all the examples is here, but not all have README files/wiring diagrams yet.

  1. On-board LEDs
  2. Traffic Lights
  3. Touch sensors
  4. Using the HAT outputs
  5. Morse Code Sender
  6. What's the buzz?
  7. Analogue Projects

About

Examples and projects for Explorer Hat Tricks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages