Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
chipkit_ledboard [2015/03/10 20:20] – [Step 5: Software] Joshua Woldstad | chipkit_ledboard [2015/03/10 20:21] – [Step 5: Software] Joshua Woldstad | ||
---|---|---|---|
Line 110: | Line 110: | ||
Here we can provide how LEDs we are running (900), which pin the data is going to be used to connect to the data line on the LEDs (pin 3 in our case), and the desired color mode. Marshall' | Here we can provide how LEDs we are running (900), which pin the data is going to be used to connect to the data line on the LEDs (pin 3 in our case), and the desired color mode. Marshall' | ||
- | We can get the LEDs lit up and running by first calling in our setup the | + | We can get the LEDs lit up and running by first calling in our setup the name_of_the_set_of_LEDs.begin(); |
- | + | ||
- | name_of_the_set_of_LEDs.begin(); | + | |
function and then choose the settings of the LEDs and subsequently update the strip of LEDs with our new values. | function and then choose the settings of the LEDs and subsequently update the strip of LEDs with our new values. | ||
- | + | For HSV color mode, you can set the hue, saturation, and value. For those of you that might not know, these values roughly translate to the color, how " | |
- | For HSV color mode, you can set the hue, saturation, and value. For those of you that might not know, these values roughly translate to the color, how " | + | This function will only set (but not yet update) the values on just one LED, so it's recommend to use a for loop to change multiple LED values. To update the LEDs so that they all show their new settings (or old if that particular LED was not updated), simply issue the following command: name_of_the_set_of_LEDs.refreshLEDs(); |
- | + | The refresheLEDs() function utilizes port manipulation and assembly code to make for a tight library so very little time is wasted in sending out the new information to the WS2812 LEDs at their designated data rate. You can check out a screen shot of the HSV demo for this library in the picture for this step. | |
- | name_of_the_set_of_LEDs.HSVsetLEDColor(which_LED_out_of_your_set_you_want_to_change, | + | |
- | + | ||
- | This function will only set (but not yet update) the values on just one LED, so it's recommend to use a for loop to change multiple LED values. | + | |
- | + | ||
- | To update the LEDs so that they all show their new settings (or old if that particular LED was not updated), simply issue the following command: | + | |
- | + | ||
- | name_of_the_set_of_LEDs.refreshLEDs(); | + | |
- | + | ||
- | The refresheLEDs() function utilizes port manipulation and assembly code to make for a tight library so very little time is wasted in sending out the new information to the WS2812 LEDs at their designated data rate. | + | |
- | + | ||
- | You can check out a screen shot of the HSV demo for this library in the picture for this step. | + | |
Go [[http:// | Go [[http:// | ||
Download [[http:// | Download [[http:// |