Giter Site home page Giter Site logo

geckoflume / led-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simondankelmann/led-server

0.0 2.0 0.0 346 KB

A Pythonserver to Control RGB-Strip LED's connected to a Raspberry Pi by listening to Commands e.g. sent by an App

Python 97.26% Shell 2.74%

led-server's Introduction

#LED-Server

This Script can be used on a Raspberry Pi to Control a RGB-Led Strip connected to its GPIO-Pins. The Script creates a Socket and waits for Commands to set the Color of your LED-Strip.

An Android App to Control the LED-Strip via Wifi can be found here: Android LED-Controller App

In Order to use it you will need the PIGPIOD Library installed on your Raspberry Pi, have a look at it here: http://abyz.co.uk/rpi/pigpio/

Before you start the script (after installing PIGPIOD) you need to run:

sudo pigpiod

to start it as a daemon. Set the IP-Address and Port in the Script to your local Settings.

#Update 02. Aug. 2016

##Autostart as systemd service: You can also setup a systemd service on your Raspberry Pi in order to autorun PIGPIOD and the LED-server at startup. Just follow this guide. Before step 2 you need to create a shell script that starts PIGPIOD and the Led-Server. Create the file /home/pi/Desktop/rgbservice.sh (or any other location) with the following content:

sudo pigpiod

sudo /usr/bin/python /LOCATION/TO/server.py

Then in step 2, change the line starting with ExecStart to the following:

ExecStart=/bin/bash /home/pi/Desktop/rgbservice.sh

Apart from that, just follow all steps of the guide.

##Autostart with rc.local: Just copy the following lines into /etc/rc.local (before the line exit 0):

/DIRECTORY/TO/pigpiod /usr/bin/python /DIRECTORY/TO/server.py &

After that just reboot: sudo reboot

#Setup Here's how to wire it, in my case i used STP16NF06L Mosfets (The RGB-Led in this Picture can be replaced by a RGB-Led Strip):

led-server's People

Contributors

simondankelmann avatar

Watchers

 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.