pixelslinger
pixelslinger copied to clipboard
Need to set SPI clock speed
Right now we're not setting the SPI clock speed.
Here is demo code doing it in C: https://github.com/zestyping/openpixelcontrol/blob/master/src/spi.c#L58
We need to reproduce this in Go.
Because we don't have this, controlling pixels from a Beaglebone will result in noisy flickering.
A temporary workaround is to run the linked C code once at boot, which will set the SPI clock speed until the next boot.
It's possible according to the syscall package docs: http://golang.org/pkg/syscall/ Something like x,y,z = syscall.Syscall(SYS_IOCTL, SPI_IOC_WR_MAX_SPEED_HZ, uinptr(speed)); might do the trick.