Code Monkey home page Code Monkey logo

traffic-raspi's Introduction

Raspberry Pi Traffic Lights

This is for all the moms and dads out their that want to teach and show their kids the joy of tech and programming. This repository contains all the info and files from my first project with my eldest daughter. For some reason, she wanted to build a traffic light. Well, here we go!

Hardware

The basic hardware I ordered are the following two things. Additionally, you will need a micro SD card and a suitable 5 V/DC 2500 mA power supply.

Quick Start (Day 1)

On the first day we focused on the assembly of all parts and the basic setup of the Pi and the Jam HAT hardware.

  1. First, we downloaded the latest Raspbian release from https://www.raspberrypi.org/downloads/raspbian/. We went for the Raspbian Stretch with desktop and recommended software release.

  2. Then, we flashed the downloaded image using balenaEtcher. It can flash the downloaded ZIP archive directly, without unpacking.

  3. We unpacked the hardware. My daughter then assembled the Raspberry Pi together with the Jam HAT board. I showed her how to connect the HDMI cable, insert the micro SD card and finally how to connect the power.

  4. We then did the basic system setup. To get this done quickly, I did most of it. Setting up the proper language and Wifi seems rather boring to an 8 year old girl.

  5. Finally, we were ready to test drive the Jam HAT hardware. We cloned the official demo repository (https://github.com/modmypi/Jam-HAT) and ran the different samples together.

After looking the the Python code, I realized that it might be a bit too early to teach my daughter a programming language. And Python 2 will definitely not be her first one! ;)

Traffic Lights with Scratch 2

So I had a look at Scratch 2. Fortunately, there is the possibility to do basic GPIO programming visually, see https://www.raspberrypi.org/documentation/usage/gpio/scratch2/README.md

Traffic Lights with Node-RED

Advanced: Programming

Of course, I was also keen on programming the Jam HAT. The official demo files of the Jam HAT were written in Python 2. So at least I wanted to use something more modern.

Using Jam HAT with Python 3

Using Jam HAT with Node.js

References

traffic-raspi's People

Contributors

lreimer avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.