diff --git a/piglow.py b/piglow.py new file mode 100644 index 0000000..a35cd35 --- /dev/null +++ b/piglow.py @@ -0,0 +1,4 @@ +import wiringpi2 as wiringpi +io = wiringpi.GPIO(wiringpi.GPIO.WPI_MODE_PINS) +io.piGlowSetup() +io.piGlowLeg(1,100) diff --git a/wiringpi.i b/wiringpi.i index 1780955..6132a36 100644 --- a/wiringpi.i +++ b/wiringpi.i @@ -218,5 +218,6 @@ extern unsigned int readNesJoystick (int joystick) ; extern void piGlow1 (const int leg, const int ring, const int intensity) ; extern void piGlowLeg (const int leg, const int intensity) ; extern void piGlowRing (const int ring, const int intensity) ; +extern void piGlowSetup (int clear) ; %include "wiringpi2-class.py" diff --git a/wiringpi2-class.py b/wiringpi2-class.py index beeb811..d178599 100644 --- a/wiringpi2-class.py +++ b/wiringpi2-class.py @@ -177,4 +177,12 @@ class GPIO(object): return lcdPrintf(self,*args) def lcdInit(self,*args): return lcdInit(self,*args) + def piGlowSetup(self,*args): + return piGlowSetup(self,*args) + def piGlow1(self,*args): + return piGlow1(self,*args) + def piGlowLeg(self,*args): + return piGlowLeg(self,*args) + def piGlowRing(self,*args): + return piGlowRing(self,*args) %} diff --git a/wiringpi2.pyc b/wiringpi2.pyc index 0ddd717..ce0c5cc 100644 Binary files a/wiringpi2.pyc and b/wiringpi2.pyc differ