Skip to content

samisabik/PyNeoPixel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyNeoPixel

A python library and arduino sketch to controll a strip of NeoPixels from a computer, raspberry pi or beaglebone via an arduino.

Arduino Sketch

The arduino sketch exposes the adafruit neopixel api over the serial line so that programs connected to the other end can controll the strip.

Uploading the sketch

  • Copy or clone the repo into the arduino sketchbook (e.g. ~/sketchbook/PyNeoPixel/PyNeoPixel.ino)
  • Use the Arduino IDE to compile and upload the sketch

Python module

There is a python module which can communicate with the Arduino sketch over serial.

Example

import neopixel
import time

strand = neopixel.NeoPixel('/dev/ttyACM0')
for x in range(5):
    strand.setPixelColor(x, 255, 0, 0)
    strand.show()
    time.sleep(1)
    strand.setPixelColor(x, 0, 255, 0)
    strand.show()
    time.sleep(1)
    strand.setPixelColor(x, 0, 0, 255)
    strand.show()
    time.sleep(1)

About

A python library (and matching arduino sketch) to control a strip of neopixels on a Arduino

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Other 45.7%
  • Python 43.8%
  • Shell 10.5%