Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- RadioShack Tri Color LED strip light show.
- This is the default code from RS - with some annotations to help explain
- what is happening
- */
- #include <avr/pgmspace.h>
- // ******** DEBUG ==== should auto config to adapt different mother board *********
- //#define DATA_1 (PORTF |= 0X01) // DATA 1 // for ATMEGA
- //#define DATA_0 (PORTF &= 0XFE) // DATA 0 // for ATMEGA
- //#define STRIP_PINOUT DDRF=0xFF // for ATMEGA
- #define DATA_1 (PORTC |= 0X01) // DEFINE a value for DATA as 1 // for UNO
- #define DATA_0 (PORTC &= 0XFE) // DEFINE a value for DATA 0 // for UNO
- #define STRIP_PINOUT (DDRC=0x3F) // DEFINE PORTC as OUTPUT // for UNO (change pins 0-5; leave PORTC 6 & 7 alone)
- /*
- Create an array of values to control each LED NODE in the standard RadioShack strip.
- PROGMEM will assign values to store in the AVR chip's RAM memory as a two dimensional array.
- We will then read out these values to create a serial pulse train OUTPUT to the LED Strip.
- Each ROW is sent as OUTPUT and will SET the COLOR for each of the TEN (10) nodes .
- Each ROW is a NEW FRAME, changing the colors again and again, creating a pattern.
- The order of the doublets (byte) controlling the COLORS is: Green - Blue - Red.
- ff is full brightness - so 0xff0000 is GREEN, 0xx00ff00 is BLUE, 0x0000ff is RED
- */
- // RED is the last doublet
- PROGMEM const unsigned long pattern_test_red[10][10]={
- {0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0},
- };
- // WHITE is ALL doublets
- PROGMEM const unsigned long pattern_test_white[10][10]={
- {0xffffff,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0xffffff,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0xffffff,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0xffffff,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0xffffff,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0xffffff,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xffffff,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xffffff,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xffffff,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xffffff},
- };
- // BLUE is the second doublet
- PROGMEM const unsigned long pattern_test_blue[10][10]={
- {0x00f000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x00f000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x00f000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x00f000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x00f000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x00f000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x00f000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x00f000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x00f000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x00f000},
- };
- // GREEN is the first doublet
- PROGMEM const unsigned long pattern_test_green[10][10]={
- {0xf00000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0xf00000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0xf00000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0xf00000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0xf00000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0xf00000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xf00000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xf00000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xf00000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xf00000},
- };
- // Each ROW changes which LED is bright, creating a moving pattern
- PROGMEM const unsigned long pattern_test_comet1[][10]={
- {0xffffff,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x444444,0xffffff,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x111111,0x444444,0xffffff,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x111111,0x444444,0xffffff,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x111111,0x444444,0xffffff,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x111111,0x444444,0xffffff,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x111111,0x444444,0xffffff,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x111111,0x444444,0xffffff,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x111111,0x444444,0xffffff,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x111111,0x444444,0xffffff},
- };
- PROGMEM const unsigned long pattern_test_comet2[][10]={
- {0xffffff,0x000000,0x000000,0x111111,0x444444,0xffffff,0x000000,0x000000,0x000000,0x000000},
- {0x444444,0xffffff,0x000000,0x000000,0x111111,0x444444,0xffffff,0x000000,0x000000,0x000000},
- {0x111111,0x444444,0xffffff,0x000000,0x000000,0x111111,0x444444,0xffffff,0x000000,0x000000},
- {0x000000,0x111111,0x444444,0xffffff,0x000000,0x000000,0x111111,0x444444,0xffffff,0x000000},
- {0x000000,0x000000,0x111111,0x444444,0xffffff,0x000000,0x000000,0x111111,0x444444,0xffffff},
- {0xffffff,0x000000,0x000000,0x111111,0x444444,0xffffff,0x000000,0x000000,0x000000,0x000000},
- {0x444444,0xffffff,0x000000,0x000000,0x111111,0x444444,0xffffff,0x000000,0x000000,0x000000},
- {0x111111,0x444444,0xffffff,0x000000,0x000000,0x111111,0x444444,0xffffff,0x000000,0x000000},
- {0x000000,0x111111,0x444444,0xffffff,0x000000,0x000000,0x111111,0x444444,0xffffff,0x000000},
- {0x000000,0x000000,0x111111,0x444444,0xffffff,0x000000,0x000000,0x111111,0x444444,0xffffff},
- };
- PROGMEM const unsigned long pattern_test_comet3[][10]={
- {0xffffff,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xffffff},
- {0x444444,0xffffff,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xffffff,0x444444},
- {0x111111,0x444444,0xffffff,0x000000,0x000000,0x000000,0x000000,0xffffff,0x444444,0x111111},
- {0x000000,0x111111,0x444444,0xffffff,0x000000,0x000000,0xffffff,0x444444,0x111111,0x000000},
- {0x000000,0x000000,0x111111,0x444444,0xffffff,0xffffff,0x444444,0x111111,0x000000,0x000000},
- {0x000000,0x000000,0x111111,0x444444,0xffffff,0xffffff,0x444444,0x111111,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0xffffff,0x444444,0x444444,0xffffff,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0xffffff,0x444444,0x111111,0x111111,0x444444,0xffffff,0x000000,0x000000},
- {0x000000,0xffffff,0x444444,0x111111,0x000000,0x000000,0x111111,0x444444,0xffffff,0x000000},
- {0xffffff,0x444444,0x111111,0x000000,0x000000,0x000000,0x000000,0x111111,0x444444,0xffffff},
- };
- // Each row changes the color and intensity of the LEDs
- PROGMEM const unsigned long pattern_test_rainbow[10][10]={
- {0xff0000,0xff7f00,0xffff00,0x00ff00,0x0000ff,0x6f00ff,0x8f00ff,0x000000,0x000000,0x000000},
- {0x000000,0xff0000,0xff7f00,0xffff00,0x00ff00,0x0000ff,0x6f00ff,0x8f00ff,0x000000,0x000000},
- {0x000000,0x000000,0xff0000,0xff7f00,0xffff00,0x00ff00,0x0000ff,0x6f00ff,0x8f00ff,0x000000},
- {0x000000,0x000000,0x000000,0xff0000,0xff7f00,0xffff00,0x00ff00,0x0000ff,0x6f00ff,0x8f00ff},
- {0x8f00ff,0x000000,0x000000,0x000000,0xff0000,0xff7f00,0xffff00,0x00ff00,0x0000ff,0x6f00ff},
- {0x6f00ff,0x8f00ff,0x000000,0x000000,0x000000,0xff0000,0xff7f00,0xffff00,0x00ff00,0x0000ff},
- {0x0000ff,0x6f00ff,0x8f00ff,0x000000,0x000000,0x000000,0xff0000,0xff7f00,0xffff00,0x00ff00},
- {0x00ff00,0x0000ff,0x6f00ff,0x8f00ff,0x000000,0x000000,0x000000,0xff0000,0xff7f00,0xffff00},
- {0xffff00,0x00ff00,0x0000ff,0x6f00ff,0x8f00ff,0x000000,0x000000,0x000000,0xff0000,0xff7f00},
- {0xff7f00,0xffff00,0x00ff00,0x0000ff,0x6f00ff,0x8f00ff,0x000000,0x000000,0x000000,0xff0000},
- };
- PROGMEM const unsigned long cylon_test_red[10][10]={
- {0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x0000f0,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000},
- {0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000},
- {0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000},
- {0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000},
- {0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x0000f0,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x0000f0,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0xf0f0f0,0x000000,0x000000,0x000000,0x000000,0x000000},
- };
- PROGMEM const unsigned long red_cylon_R[][10]={
- {0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0},
- };
- PROGMEM const unsigned long red_cylon_L[][10]={
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- {0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
- };
- PROGMEM const unsigned long trek_bridge[10][10]={
- {0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0},
- {0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000},
- {0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0x0000f0,0xf000f0,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x000000,0xf000f0,0x0000f0,0x000000,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000},
- {0x000000,0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000,0x000000},
- {0x000000,0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0,0x000000},
- {0x0000f0,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000f0},
- };
- // ***********************************************************************************************************
- // *
- // * INITIALIZE the system on Power Up or after a RESET
- // *
- // *
- // ***********************************************************************************************************
- void setup() {
- STRIP_PINOUT; // sets the output pin to control the LED Strip
- reset_strip(); // resets each of the LED nodes to OFF
- }
- // ***********************************************************************************************************
- // *
- // * Main Program Loop
- // *
- // *
- // ***********************************************************************************************************
- void loop()
- {
- /*
- This is a TEST PATTERN to show that all of the
- segments ("nodes") are working properly.
- This Runs Only ONCE ... because the next loop
- never finishes.
- You could remove the WHILE loop and then these patterns
- would run continuosly, as long as there is power to the board.
- */
- int q = 1;
- send_1M_pattern(pattern_test_red, 10, 500);
- delay(500);
- send_1M_pattern(pattern_test_white, 10, 500);
- delay(500);
- send_1M_pattern(pattern_test_blue, 10, 500);
- delay(500);
- send_1M_pattern(pattern_test_green, 10, 500);
- delay(500);
- send_1M_pattern(pattern_test_comet1, 10, 70);
- delay(500);
- send_1M_pattern(pattern_test_comet2, 10, 70);
- delay(500);
- send_1M_pattern(pattern_test_comet3, 10, 70);
- delay(500);
- send_1M_pattern(pattern_test_green, 10, 500);
- delay(1000); // Wait for one second to make you think about the infinite loop
- /* TEN CYCLES OF TREK BRIDGE */
- q = 20;
- while (q>0){
- send_1M_pattern(trek_bridge, 10, 30);
- q -= 1;
- }
- delay(500);
- /*
- Use this to control which pattern is sent to the
- LED Strip.
- This loop runs will run continously inside the "master" loop;
- because the value of WHILE (1) never changes.
- */
- while (1)
- {
- send_1M_pattern(pattern_test_white, 10, 500);
- delay(500);
- send_1M_pattern(pattern_test_rainbow, 10, 70);
- delay(500);
- send_1M_pattern(pattern_test_green, 10, 500);
- delay(1000); // Wait for one second to make you think about the infinite loop
- send_1M_pattern(cylon_test_red, 10, 70);
- delay(500);
- /* TEN CYCLES OF CYLON */
- q = 10;
- while (q>0){
- send_1M_pattern(red_cylon_R, 10, 70);
- send_1M_pattern(red_cylon_L, 10, 70);
- q -= 1;
- }
- delay(500);
- /* TEN CYCLES OF TREK BRIDGE */
- q = 20;
- while (q>0){
- send_1M_pattern(trek_bridge, 10, 30);
- q -= 1;
- }
- delay(500);
- send_1M_pattern(pattern_test_blue, 10, 70);
- delay(500);
- }
- }
- /*******************************************************************************
- * Function Name: send_1M_pattern
- * Description: Transmit pattern to whole 1 meter strip*
- * Input : Pointer to RAM pattern; pattern length; frame rate*
- * Output: Sends out a serial pulse train using the send_strip function
- * Return: None
- *******************************************************************************/
- void send_1M_pattern(const unsigned long data[][10], int pattern_no, int frame_rate)
- {
- int i=0;
- int j=0;
- uint32_t temp_data;
- // Each pattern sends out [x] packets - one for each NODE (RGB LED cluster)
- // pattern_no is the [y] dimension of the array - the number of ROWS in each pattern array set
- for (i=0;i<pattern_no;i++)
- {
- noInterrupts(); // Turn OFF Interupts for more precise Pulse Timing
- for (j=0;j<10;j++)
- {
- temp_data=pgm_read_dword_near(&data[i][j]);
- send_strip(temp_data);
- }
- interrupts(); // Turn ON Interrupts after data is sent
- delay(frame_rate); // Delay between each pulse train - sets the duration of each Frame, before the next signal is sent;
- /* CONTROLS THE VISUAL SPEED OF THE DISPLAY CHANGES */
- }
- }
- /*******************************************************************************
- * Function Name: send_strip
- * Description: Creates and Transmits a serial train of 24 pulses for the LED strip
- * Input: 24-bit data sets intensity of each color, which will persist until
- * the next cycle makes a change
- * Output: Sends a train of 24 pulses (bits) representing values of 0 or 1 to the output pin ()
- * Return: Nothing returned from function
- *******************************************************************************/
- void send_strip(uint32_t data)
- {
- int i;
- unsigned long j=0x800000;
- for (i=0;i<24;i++)
- {
- if (data & j)
- {
- DATA_1;
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- /*----------------------------*/
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- /*----------------------------*/
- DATA_0;
- }
- else
- {
- DATA_1;
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- DATA_0;
- /*----------------------------*/
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- __asm__("nop\n\t");
- /*----------------------------*/
- }
- j>>=1;
- }
- }
- /*******************************************************************************
- * Function Name: reset_strip
- * Description: Send a 0 pulse to reset all color of the strip*
- * Input: None*
- * Output: Sends out a looong value of 0 on the output pin
- * Return: None
- *******************************************************************************/
- void reset_strip()
- {
- DATA_0;
- delayMicroseconds(20);
- }
Advertisement
Add Comment
Please, Sign In to add comment