NotEnoughTech
Published © CC BY-ND

Making MusicPi: Amazon Echo Music Streamer

Stream your local music library to Amazon Echo for FREE!

IntermediateFull instructions provided3 hours6,143
Making MusicPi: Amazon Echo Music Streamer

Things used in this project

Hardware components

Raspberry Pi 3A+
×1
LED (generic)
LED (generic)
×4
Resistor 221 ohm
Resistor 221 ohm
×2
USB stick
×1

Software apps and online services

Raspbian
Raspberry Pi Raspbian

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)
Laser cutter (generic)
Laser cutter (generic)

Story

Read more

Custom parts and enclosures

MusicPi - laser and print files

2 lid parts to cut and the bottom to print out

Schematics

LED schematics

How to connect LEDs

Code

Code snippet #1

Plain text
Running the script at boot
sudo chmod +x /home/pi/lights.py

#then -----------------

sudo crontab -e

@reboot python /home/pi/lights.py &

LED driver

Python
This is a simple script that turns the lights on on boot
#!/usr/bin/env python
import RPi.GPIO as GPIO
import time
LedPin1 = 03
LedPin2 = 04
LedPin3 = 19
LedPin4 = 26
GPIO.setmode(GPIO.BCM)
GPIO.setup(LedPin1, GPIO.OUT)
GPIO.output(LedPin1, GPIO.HIGH)
GPIO.setup(LedPin2, GPIO.OUT)
GPIO.output(LedPin2, GPIO.HIGH)
GPIO.setup(LedPin3, GPIO.OUT)
GPIO.output(LedPin3, GPIO.HIGH)
GPIO.setup(LedPin4, GPIO.OUT)
GPIO.output(LedPin4, GPIO.HIGH)

Credits

NotEnoughTech

NotEnoughTech

10 projects • 82 followers
I'm Mat I play with gadgets, make new stuff and automate pretty much everything that requires repeating more than once!

Comments