KnightHolden
Published © GPL3+

Project 2 Environment Grenade

A grenade made using the dying environment.

BeginnerFull instructions provided2 hours29
Project 2 Environment Grenade

Things used in this project

Hardware components

Circuit Playground Express
Adafruit Circuit Playground Express
×1
Alligator Clips
Alligator Clips
×1
Rotary Potentiometer, 1 Mohm
Rotary Potentiometer, 1 Mohm
×1
plastic bottle
×1
Plastic bag
×1
tape
×1

Software apps and online services

MakeCode
Microsoft MakeCode

Story

Read more

Schematics

Image 1

Image 2

Image 3

Image 4

Code

Project 2 Code

Makefile
It is a fake grenade. It uses a potentiometer to increase and decrease the brightness of the circuit playground express neopixels. The accelerometer is used to see if it moves. If it moves enough it sets off an explosion sound. Together it is meant to simulate a futuristic grenade that powers up then explodes. It uses three alligator clips to connect the potentiometer to the board. The casing is a soda bottle that is meant to look like a grenade and a green plastic bag to hide the wires.

The code starts with on start where it sets the volume. I placed it high because it is meant to be a loud explosion. Then in a forever loop, I have a variable that is being set to the value on pin A1. The brightness is then set using the variable. Finally, on shake play a sound called wawawawaa.
No preview (download only).

Credits

KnightHolden

KnightHolden

3 projects • 0 followers

Comments