I'm trying the clock rate of the Toolbox.NETMF.Hardware>RgbLedStrip library but can't seem to succeed.
The library offers no access to the clock rate.
Steps taken so far:
1. Try to access the RgbLedStrip library. - no access to clock settings
2. Instantiated a new spi.config and set it to SPI_Devices.SPI1. - The changes in the new config didn't change my output.
The question is, how do I change the clock speed of the SPI while using the NETMF toolbox?
Here is the test code.
public class Program
{
private static RgbLedStrip Chain = new RgbLedStrip(RgbLedStrip.Chipsets.WS2801, 114, SPI.SPI_module.SPI1); //45 count on FLOOR and 150 count for CAN
public static void Main()
{
SPI.Configuration spiDevice1 = new SPI.Configuration(Pins.GPIO_PIN_D10, false, 0, 0, false, false, 100, SPI_Devices.SPI1);
//The line above is supposed to set the SPI1 config. I am trying to set the clock rate to 100 but there is no change in my program.
//I even tried instantiating the "RgbLedStrip" with the above "spiDevice1" and still no change to the clock speed.
while (true)
{
for (int i = 0; i < 74; i++)
{
Chain.SetColor(i, 0x34BAC6, false);
Thread.Sleep(1);
}
for (int i = 74; i < 114; i++)
{
Chain.SetColor(i, 0xFFFFFF, false);
Thread.Sleep(5);
}
Thread.Sleep(5000);
Chain.SetColorAll(0x000000, false);
}
}
}