I'm using the Edison to control a project, and want to use the ws2812 LEDs. They need a signal that is precisely 800kbps. How do I output a signal at that specific frequency? Specifically, I'm communicating with the Edison via Putty, if that makes a difference.
Thank you for contacting us.
One approach to achieve a desired frequency is using the MRAA library. Specifically, the PWM class has some functions that might help you get the 800kbps you need. Some of the most useful resources we found are these ones:
Also, I looked for examples on how to use the Edison along with the ws2812. I found a few useful guides online, that I think you should see since they provide different approaches. One of the most interesting ones is this: https://www.hackster.io/thingsoc/neoled-neopixels-on-edison-39e91c https://www.hackster.io/thingsoc/neoled-neopixels-on-edison-39e91c
Let us know if you found this useful.
Unfortunately, I need a signal every 1.25 microseconds. The mraa_pwm_period_us command requires an integer, which 1.25 is not.
Using I2C is not an option because we are using it for other things; we can't add another unit to our I2C bus.
As you stated, the period_us function requires an integer, but, there are other options available. Have you considered using the period function which uses an integer?
We also thought of another option. Take a look at this example https://github.com/MakersTeam/Edison/blob/master/Arduino-Examples/setPWM_Edison.ino https://github.com/MakersTeam/Edison/blob/master/Arduino-Examples/setPWM_Edison.ino . This is not an MRAA example, it's an Arduino example, but, you can try to set it with the appropriate parameters to see if you're able to achieve the 800kbps you're looking for.
Let us know your results using these 2 approaches.
We'll be waiting for your response.