A young boy with a backpack walks across a white striped crosswalk towards a dark, non-operational traffic light on a sunny day with buildings in the background.
Two pedestrian traffic signals are mounted on a dark pole, with one showing a green "walk" symbol and another a red "don't walk" symbol, set against a classic building facade.

Traffic lights and crosswalks keep people safe when walking or biking in their community. Crosswalks help cars know when to stop and when pedestrians can cross, so everyone stays out of harm’s way. Plus, when our communities are more walkable, we use fewer pollution-emitting vehicles!

Let’s think about Sustainable Cities and Communities by building a smart crosswalk for Forward’s Smart City!

The crosswalk in the project will:

  • cycle traffic on a timer using red, yellow, and green LEDs
  • activate pedestrian signals when a button is pressed
Forward Education's Smart Streetlight with pedestrian crossing

Prepare

You’ll need the following items to complete this project:

Build

First, let’s build our crosswalk project with the building blocks and robotic components from the Climate Action Kit and the Smart Solder component:

As you build, think about the placement of your pedestrian signal, and how to make your smart crosswalk sturdy.

Code

Explore the code below to get started using your smart crosswalk.

  • Connect your project to the computer and download the starter code to make it work!
  • Review the code comments on each block to learn about how your crosswalk works, then try testing it in real life.

Improve

Think about accessible features to add to your smart crosswalk! How would you modify the sample code provided, or create your own code that includes the following features?

  • A motion sensor to sense when a car is waiting
  • A second light to signal to oncoming traffic when it’s time to go

No Smart Soldering Kit? No Problem!

You can modify this project by replacing the Smart Solder component with the LED Ring from the Climate Action Kit, and test your crosswalk using the code provided.

Feeling Stuck? Explore the Knowledge Base for common questions and troubleshooting tips.