APA102 with WiPy v1 board?

Questions and discussion about The WiPy 1.0 board and CC3200 boards.
Target audience: Users with a WiPy 1.0 or CC3200 board.
Post Reply
User avatar
Posts: 3
Joined: Sun Jun 21, 2015 8:18 am
Location: Germany, Nuremberg

APA102 with WiPy v1 board?

Post by s-light » Thu Nov 01, 2018 1:35 pm

Hello Community,

is there a already provided / ready to use library for the APA102 LEDs in combination with the WiPy (v1 - the kickstarter one) ?

on my search i found
- Driving DotStar APA102 LED strings with the BBC micro:bit → bare SPI generation
- docs.micropython.org/../esp8266/quickref.html#apa102-driver →library but only in ESP* available?

the bare SPI code should be fairly easy to write - as i have done some drivers for this sort of led-controller already (in c++)
but i originally just wanted to do a quick hack to get the leds light up ;-)

i have an unused WiPy in my collection and would like to get some simple led-thing with 'web-page-control' (really simple) to work..
it would be my first MicroPython project - and yes i know it could get complex fast ;-)
my first goal is to just get my led-strip to work.
( i know i need some sort of precautions for level-shifting the 3.3V to the 5V for the leds...)

i hope there is some ideas or libs out there you can point me at ;-)
i am open to all kind of ideas ;-)

sunny greetings

Posts: 476
Joined: Mon Nov 20, 2017 10:18 am

Re: APA102 with WiPy v1 board?

Post by OutoftheBOTS_ » Thu Nov 01, 2018 8:38 pm

I used the APA102 a lot with Raspberry Pi because they have a clocking line and don't require precise timing like Neo-Pixels.

I have never used a level shifter and everything always works fine, the APA102 reads the 3.3v inputs fine.
5v supply -> APA102 Vin
GND -> APA102 and RPi GND
RPi MOSI -> APA102 Din
RPi CLK -> APA102 CLKin

I do have a nice Python library for RPi that both drives the APA102 and also has some nice effects. It would only require changing the SPI bus setup to make it work on Micro-Python see https://github.com/OutOfTheBots/APA102

I did just notice in my driver on github it is using a lower SPI baud rate off memory I ended up going as fast as 64MHz and the APA102 still worked fine it was only speeds above this that it failed.

Post Reply