Akash Ravichandran
Created March 18, 2019

Infinity Badge

Infinity Badge for the Infinite People with Infinite Power.

110

Things used in this project

Hardware components

APA 102 Sparkfun Led Strip
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Hot glue gun (generic)
Hot glue gun (generic)

Story

Read more

Schematics

Schematic for Connecting APA 102 to Arduino

Code

Switch on the LED Strip - Dotstar

Arduino
It turns on the LED strip to give it an infinite look.
#include <Adafruit_DotStar.h>
#include <SPI.h>

#define NUMPIXELS 30

// Create the strip

Adafruit_DotStar strip = Adafruit_DotStar(NUMPIXELS, DOTSTAR_BRG) ;

void simpleOn(uint32_t color, uint8_t head, uint8_t tail) {
  for (int i=(tail-1); i < head; i++){
    strip.setPixelColor(i, color) ;
  }
  strip.show() ;
}

void setup() {
  strip.begin() ;
  strip.show() ; // This turns off the LEDs within NUMPIXELS

}

void loop() {
  uint8_t head, tail ;
  uint32_t color ;
  color = 0x1577D5 ;
  head = 7 ;
  tail = 2 ;
  simpleOn(color, head, tail) ;
  delay(1000) ;

}

Credits

Akash Ravichandran

Akash Ravichandran

15 projects • 82 followers
Developer and a Learner

Comments