Adafruit will not be shipping orders Monday May 27, 2019 Memorial Day Orders placed after 11am EST Friday May 24 will go out Tuesday May 28.
0

Using A Raspberry Pi and Node-Red to Make A Game #piday #raspberrypi @Raspberry_Pi

NewImage

9 year old LDR posted this great Raspberry Pi + Node-Red game that they made up on the element14 community.

Introduction

In this game, you roll coins down a ramp onto a board with foil islands. When the coins make a bridge from one side to the other, it is a complete circuit and an LED lights up.

Version 1

First, I cut out the box and the foil islands. Then I stuck the islands onto the box and two rails along two opposite sides with glue. We made a circuit that made a LED light up and connected that to the rails with paper clips.

When coins made a “bridge” between the islands, the electricity flows and lets the LED light up. (We soaked the coins in vinegar to make them shiny and conduct well).

I made a ramp to roll the coins down out of cardboard and the game worked….

But not well enough!

Version 2 (writing the Node-Red)

We improved the game using a Raspberry Pi and Node-Red. I wanted a timer to make the game more exciting. We had a traffic light, so I used that by putting it straight onto the output pins of the Raspberry Pi.

We connected the two side rails to input pins on the Raspberry Pi so that it could tell if the coins had made the circuit complete.

I used a buzzer to tell you when the time was up.

I also used a switch to start the game. The green light went on for 20 seconds. Then the amber light came on for 20 seconds. Then the red light came on for 20 seconds. Finally, the buzzer went off.

If the coins made a bridge before the time was up, all of the LEDs flashed.

Finally

The game is fun to make and fun to play. It is a good project because it teaches you how to programme a real game, not just on the screen.

Read more.

NewImage


998Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!


Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, or even use Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for MakeCode, CircuitPython, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Join 10,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython 2019!

Have an amazing project to share? The Electronics Show and Tell with Google Hangouts On-Air is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat – we’ll post the link there.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/


Maker Business — Robotics manufacturer Anki shuts down

Wearables — Brace for fabric

Electronics — DRC Confusion

Biohacking — Senolytic Therapies

Python for Microcontrollers — CircuitPython 4 released, upcoming hardware, and more! #Python #Adafruit #CircuitPython #PythonHardware @circuitpython @micropython @ThePSF @Adafruit

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



No Comments

No comments yet.

Sorry, the comment form is closed at this time.