Author Topic: SOLVED: Have Pi & PiCap, want to drive with Python  (Read 302 times)

Offline gpvillamil

  • Newbie
  • *
  • Join Date: Jan 2019
  • Location:
  • Posts: 18
  • Kudos: 0
SOLVED: Have Pi & PiCap, want to drive with Python
« on: January 03, 2019, 11:29:37 AM »

Everything works fine with Python libraries that use GPIO18.


The Adafruit neopixel library does not support GPIO19, but the rpi_ws281x library does.


=====================================

Hi there, we have some Pi 3 B+ and PiCap boards. Everything looks good so far.


However, we want to run some custom software on the Pi boards (for detecting user presence) and integrate LED control into that.


Is there any documentation on how to drive the PiCap board directly from Python? We are using WS2812 LEDs, and have previously run them straight from the GPIO on the Pi.
« Last Edit: January 07, 2019, 03:28:06 PM by gpvillamil »

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: Have Pi & PiCap, want to drive with Python
« Reply #1 on: January 03, 2019, 11:41:21 AM »
If you can drive ws2811 from the Pi already, then that code should work with the PiCap as long as the code uses the two PWM outputs.  There are some pixel drivers that use the PCM or SPI  pins which are not hooked up on the PiCap.
-
Chris

Offline gpvillamil

  • Newbie
  • *
  • Join Date: Jan 2019
  • Location:
  • Posts: 18
  • Kudos: 0
Re: Have Pi & PiCap, want to drive with Python
« Reply #2 on: January 03, 2019, 11:50:10 AM »
Great, thanks!


We are using the Adafruit Neopixel libraries, which do use the PWM outputs.

Offline gpvillamil

  • Newbie
  • *
  • Join Date: Jan 2019
  • Location:
  • Posts: 18
  • Kudos: 0
Re: Have Pi & PiCap, want to drive with Python
« Reply #3 on: January 03, 2019, 04:56:34 PM »

Is there any info re which PWM pins on the GPIO are hooked up?


Not having any joy with GPIO 18.

If you can drive ws2811 from the Pi already, then that code should work with the PiCap as long as the code uses the two PWM outputs.  There are some pixel drivers that use the PCM or SPI  pins which are not hooked up on the PiCap.

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: Have Pi & PiCap, want to drive with Python
« Reply #4 on: January 03, 2019, 05:27:58 PM »
GPIO 18 and 19 are what are hooked up on the PiCap.

Did you disable the onboard audio?  FPP does that for you automatically when you setup the Channel Output, but if you are running stock Raspbian you will need to do it yourself.

 

Back to top