Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Liam VarnerMichael Noonan
Published © LGPL

Interactive Toddler Toy

A simple toy designed to help develop some early motor skills in small children by using buttons, lights, and other components.

IntermediateShowcase (no instructions)8 hours539
Interactive Toddler Toy

Things used in this project

Hardware components

RGB Diffused Common Cathode
RGB Diffused Common Cathode
×1
Analog joystick (Generic)
×1
Momentary Button - Panel Mount (Red)
×1
Momentary Button - Panel Mount (Yellow)
×1
Momentary Button - Panel Mount (Blue)
×1
LED (generic)
LED (generic)
There should be 1 Red, 1 Blue, and 1 Yellow LEDs
×3
Addressable LED
×5
Buzzer
Buzzer
×1
Softpot Potentiometer 50mm
×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)
Drill (Generic)

Story

Read more

Schematics

Wiring for Entire Project

This has the entire wiring setup that will be needed for the project.

Addressable LEDs Setup

This is a clearer picture of how to wire these Addressable LEDs

Code

Code For Entire Project

Arduino
This is the code that was used for the entire project which includes how to code the addressable LEDs, the joystick, and the potentiometer.
#include <Adafruit_NeoPixel.h>
Adafruit_NeoPixel strip = Adafruit_NeoPixel(5, 6, NEO_RGB + NEO_KHZ800);

#include "pitches.h"

const int SOFT_POT_PIN = A0; // Pin connected to softpot wiper
const int VERT = A1; // y thumbstick
const int HORIZ = A2; // x thumbstick
const int constON = A4;
const int constON1 = A5;
const int SEL =11; // digital
const int RED_PIN = 7;    // Red LED Pin Buzzer
const int GREEN_PIN = 5; // Green LED Pin Buzzer
const int BLUE_PIN = 9;  // Blue LED Pin Buzzer
const int buzzerPin = 8;



const int GRAPH_LENGTH = 40; // Length of line graph

int tempRed = 0;
int tempGreen = 0;
int tempBlue = 0;
int wait = 250;

void setup() 
{
  Serial.begin(9600);
  pinMode(SOFT_POT_PIN, INPUT);
  pinMode(constON, OUTPUT);
  pinMode(constON1, OUTPUT);
  pinMode(RED_PIN, OUTPUT);
  pinMode(GREEN_PIN, OUTPUT);
  pinMode(BLUE_PIN, OUTPUT);
  pinMode(buzzerPin, OUTPUT);
  pinMode(SEL,INPUT);
  digitalWrite(SEL,HIGH);
  digitalWrite(constON, HIGH);
  digitalWrite(constON1, HIGH);


  strip.begin();
  strip.show();
  pcr();
  strip.setPixelColor(0, 100, 0, 0);
  strip.setPixelColor(1, 100, 0, 0);
  strip.setPixelColor(2, 100, 0, 0);
  strip.setPixelColor(3, 100, 0, 0);
  strip.setPixelColor(4, 100, 0, 0);
  strip.show();
  tone(8, NOTE_G4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);
  
  strip.setPixelColor(0, 170, 80, 10);
  strip.setPixelColor(1, 170, 80, 10);
  strip.setPixelColor(2, 170, 80, 10);
  strip.setPixelColor(3, 170, 80, 10);
  strip.setPixelColor(4, 170, 80, 10);
  strip.show();
  tone(8, NOTE_A4);
  delay(wait);
  noTone(8);
  pcr();
  delay(wait/10);
  
  strip.setPixelColor(0, 120, 0, 200);
  strip.setPixelColor(1, 120, 0, 200);
  strip.setPixelColor(2, 120, 0, 200);
  strip.setPixelColor(3, 120, 0, 200);
  strip.setPixelColor(4, 120, 0, 200);
  strip.show();
  tone(8, NOTE_F4);
  delay(wait);
  noTone(8);
  pcr();
  delay(wait/10);
  
  strip.setPixelColor(0, 128, 120, 0);
  strip.setPixelColor(1, 128, 120, 0);
  strip.setPixelColor(2, 128, 120, 0);
  strip.setPixelColor(3, 128, 120, 0);
  strip.setPixelColor(4, 128, 120, 0);
  strip.show();
  tone(8, NOTE_F3);
  delay(wait);
  noTone(8);
  pcr();
  delay(wait/10);
  
  strip.setPixelColor(0, 140, 180, 180);
  strip.setPixelColor(1, 140, 180, 180);
  strip.setPixelColor(2, 140, 180, 180);
  strip.setPixelColor(3, 140, 180, 180);
  strip.setPixelColor(4, 140, 180, 180);
  strip.show();
  tone(8, NOTE_C4);
  delay(wait);
  noTone(8);
  pcr();

}

void loop() 
{
  // Read in the soft pot's ADC value
  int softPotADC = analogRead(SOFT_POT_PIN);
  int mapSoftPotADC = map(softPotADC, 1, 690, 0, 127);
  // Map the 0-1023 value to 0-40
  int softPotPosition = map(softPotADC, 1, 690, 0, GRAPH_LENGTH);
  
  // Print a line graph:
  Serial.print("<"); // Starting end
  for (int i=0; i<GRAPH_LENGTH; i++)
  {
    if (i == softPotPosition) Serial.print("|");
    else Serial.print("-");
  }
  Serial.print("> (" + String(softPotADC) + ") map: " + mapSoftPotADC);
  decideColor(softPotADC);
  setColor();

  
  int vertical = analogRead(VERT); // will be 0-1023
  int horizontal = analogRead(HORIZ); // will be 0-1023
  int select = digitalRead(SEL); // will be HIGH (1) if not pressed, and LOW (0) if pressed
  decideIfTune(horizontal, vertical, select);
  Serial.print(" vertical: ");
  Serial.print(vertical,DEC);
  Serial.print(" horizontal: ");
  Serial.print(horizontal,DEC);
  Serial.print(" select: ");
  if(select == HIGH)
    Serial.println("not pressed");
  else
    Serial.println("PRESSED!");

  
  int toneSound = map(softPotADC, 1, 690, 100, 650);
  if(softPotADC <= 15){
    noTone(buzzerPin);
    delay(50);
  }
    else{
    tone(buzzerPin, toneSound);
    delay(50);
    }
}


void decideColor(int softPot){
  if(softPot <= 15){
    tempRed = 0;
    tempGreen = 0;
    tempBlue = 0;
  }
  else if (softPot < 230)  // Lowest third of the potentiometer's range (0-340)
  {                  
    tempRed = 256 - map(softPot, 1, 230, 0, 256);  // Red from full to off
    tempGreen = map(softPot, 1, 230, 0, 256);        // Green from off to full
    tempBlue = 1;             // Blue off
  }
  else if (softPot < 460) // Middle third of potentiometer's range (341-681)
  {
    tempRed = 1;            // Red off
    tempGreen = 256 - map(softPot, 231, 460, 0, 256); // Green from full to off
    tempBlue = map(softPot, 231, 460, 0, 256);       // Blue from off to full
  }
  else  // Upper third of potentiometer"s range (682-1023)
  {

    tempRed = map(softPot, 461, 690, 0, 256);       // Red from off to full
    tempGreen = 1;            // Green off
    tempBlue = 256 - map(softPot, 461, 690, 0, 256); // Blue from full to off
  }
}

void setColor() {
  analogWrite(RED_PIN, tempRed);
  analogWrite(GREEN_PIN, tempGreen);
  analogWrite(BLUE_PIN, tempBlue);
}

void decideIfTune(int h, int v, int p){
  if(p == LOW){
    strip.begin();
    strip.show();
    pcr();

    strip.setPixelColor(0, 100, 100, 100);
    strip.setPixelColor(1, 100, 100, 100);
    strip.setPixelColor(2, 100, 100, 100);
    strip.setPixelColor(3, 100, 100, 100);
    strip.setPixelColor(4, 100, 100, 100);
    strip.show();
    tone(8, NOTE_A4); // this starts the tone
    delay(125);
    noTone(8);
    delay(75);
    tone(8, NOTE_G3); // this starts the tone
    delay(75);
    noTone(8);
    delay(75);
    tone(8, NOTE_G3); // this starts the tone
    delay(75);
    noTone(8);
    delay(75);
    
    tone(8, NOTE_A4); // this starts the tone
    delay(125);
    noTone(8);
    delay(75);
    tone(8, NOTE_G3); // this starts the tone
    delay(125);
    noTone(8);
    delay(500);
    tone(8, NOTE_B4); // this starts the tone
    delay(125);
    noTone(8);
    delay(75);
    tone(8, NOTE_C5); // this starts the tone
    delay(250);
    noTone(8);
    delay(500);
    pcr();
  }
  
  else if(h <= 100){
    tune0();
  }

  else if(v >= 800){
    tune1();
  }

  else if(h >= 800){
    tune2();
  }

  else if(v <= 100){
    tune3();
  }
  return;
}

void tune0(){
  strip.begin();
  strip.show();
  
  // We initalize the NeoPixel Library here, by starting it and then sending the first strip.show() command.
  // Next we will tell all of the LEDs to switch off before continuing.
  
  pcr(); // PixelColorsReset function, it turns all of the LEDs completely off.
         // This custom function can be found at the bottom of this Sketch.

  
  //E
  strip.setPixelColor(0, 100, 0, 0);
  strip.setPixelColor(1, 100, 0, 0);
  strip.setPixelColor(2, 100, 0, 0);
  strip.setPixelColor(3, 100, 0, 0);
  strip.setPixelColor(4, 100, 0, 0);
  strip.show();
  tone(8, NOTE_E4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //D
  strip.setPixelColor(0, 100, 0, 0);
  strip.setPixelColor(1, 100, 0, 0);
  strip.setPixelColor(2, 100, 0, 0);
  strip.setPixelColor(3, 100, 0, 0);
  strip.setPixelColor(4, 100, 0, 0);
  strip.show();
  tone(8, NOTE_D4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //C
  strip.setPixelColor(0, 100, 0, 0);
  strip.setPixelColor(1, 100, 0, 0);
  strip.setPixelColor(2, 100, 0, 0);
  strip.setPixelColor(3, 100, 0, 0);
  strip.setPixelColor(4, 100, 0, 0);
  strip.show();
  tone(8, NOTE_C4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //D
  strip.setPixelColor(0, 100, 0, 0);
  strip.setPixelColor(1, 100, 0, 0);
  strip.setPixelColor(2, 100, 0, 0);
  strip.setPixelColor(3, 100, 0, 0);
  strip.setPixelColor(4, 100, 0, 0);
  strip.show();
  tone(8, NOTE_D4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //E
  strip.setPixelColor(0, 100, 0, 0);
  strip.setPixelColor(1, 100, 0, 0);
  strip.setPixelColor(2, 100, 0, 0);
  strip.setPixelColor(3, 100, 0, 0);
  strip.setPixelColor(4, 100, 0, 0);
  strip.show();
  tone(8, NOTE_E4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //E
  strip.setPixelColor(0, 100, 0, 0);
  strip.setPixelColor(1, 100, 0, 0);
  strip.setPixelColor(2, 100, 0, 0);
  strip.setPixelColor(3, 100, 0, 0);
  strip.setPixelColor(4, 100, 0, 0);
  strip.show();
  tone(8, NOTE_E4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //E
  strip.setPixelColor(0, 100, 0, 0);
  strip.setPixelColor(1, 100, 0, 0);
  strip.setPixelColor(2, 100, 0, 0);
  strip.setPixelColor(3, 100, 0, 0);
  strip.setPixelColor(4, 100, 0, 0);
  strip.show();
  tone(8, NOTE_E4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  delay(250);

 
}

void tune1(){
  strip.begin();
  strip.show();
  
  // We initalize the NeoPixel Library here, by starting it and then sending the first strip.show() command.
  // Next we will tell all of the LEDs to switch off before continuing.
  
  pcr(); // PixelColorsReset function, it turns all of the LEDs completely off.
         // This custom function can be found at the bottom of this Sketch.

  // We play the melody once during setup with all 5 LEDs lighting up in the color for the tone being played.
  

  //D
  strip.setPixelColor(0, 100, 100, 0);
  strip.setPixelColor(1, 100, 100, 0);
  strip.setPixelColor(2, 100, 100, 0);
  strip.setPixelColor(3, 100, 100, 0);
  strip.setPixelColor(4, 100, 100, 0);
  strip.show();
  tone(8, NOTE_D4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //D
  strip.setPixelColor(0, 100, 100, 0);
  strip.setPixelColor(1, 100, 100, 0);
  strip.setPixelColor(2, 100, 100, 0);
  strip.setPixelColor(3, 100, 100, 0);
  strip.setPixelColor(4, 100, 100, 0);
  strip.show();
  tone(8, NOTE_D4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //D
  strip.setPixelColor(0, 100, 100, 0);
  strip.setPixelColor(1, 100, 100, 0);
  strip.setPixelColor(2, 100, 100, 0);
  strip.setPixelColor(3, 100, 100, 0);
  strip.setPixelColor(4, 100, 100, 0);
  strip.show();
  tone(8, NOTE_D4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  delay(250);

  //E
  strip.setPixelColor(0, 100, 100, 0);
  strip.setPixelColor(1, 100, 100, 0);
  strip.setPixelColor(2, 100, 100, 0);
  strip.setPixelColor(3, 100, 100, 0);
  strip.setPixelColor(4, 100, 100, 0);
  strip.show();
  tone(8, NOTE_E4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //G
  strip.setPixelColor(0, 100, 100, 0);
  strip.setPixelColor(1, 100, 100, 0);
  strip.setPixelColor(2, 100, 100, 0);
  strip.setPixelColor(3, 100, 100, 0);
  strip.setPixelColor(4, 100, 100, 0);
  strip.show();
  tone(8, NOTE_G4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //G
  strip.setPixelColor(0, 100, 100, 0);
  strip.setPixelColor(1, 100, 100, 0);
  strip.setPixelColor(2, 100, 100, 0);
  strip.setPixelColor(3, 100, 100, 0);
  strip.setPixelColor(4, 100, 100, 0);
  strip.show();
  tone(8, NOTE_G4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  delay(250);
}

void tune2(){
  strip.begin();
  strip.show();
  
  // We initalize the NeoPixel Library here, by starting it and then sending the first strip.show() command.
  // Next we will tell all of the LEDs to switch off before continuing.
  
  pcr(); // PixelColorsReset function, it turns all of the LEDs completely off.
         // This custom function can be found at the bottom of this Sketch.

  // We play the melody once during setup with all 5 LEDs lighting up in the color for the tone being played.
  

  //E
  strip.setPixelColor(0, 0, 100, 0);
  strip.setPixelColor(1, 0, 100, 0);
  strip.setPixelColor(2, 0, 100, 0);
  strip.setPixelColor(3, 0, 100, 0);
  strip.setPixelColor(4, 0, 100, 0);
  strip.show();
  tone(8, NOTE_E4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //D
  strip.setPixelColor(0, 0, 100, 0);
  strip.setPixelColor(1, 0, 100, 0);
  strip.setPixelColor(2, 0, 100, 0);
  strip.setPixelColor(3, 0, 100, 0);
  strip.setPixelColor(4, 0, 100, 0);
  strip.show();
  tone(8, NOTE_D4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);
   
  //C
  strip.setPixelColor(0, 0, 100, 0);
  strip.setPixelColor(1, 0, 100, 0);
  strip.setPixelColor(2, 0, 100, 0);
  strip.setPixelColor(3, 0, 100, 0);
  strip.setPixelColor(4, 0, 100, 0);
  strip.show();
  tone(8, NOTE_C4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //D
  strip.setPixelColor(0, 0, 100, 0);
  strip.setPixelColor(1, 0, 100, 0);
  strip.setPixelColor(2, 0, 100, 0);
  strip.setPixelColor(3, 0, 100, 0);
  strip.setPixelColor(4, 0, 100, 0);
  strip.show();
  tone(8, NOTE_D4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //E
  strip.setPixelColor(0, 0, 100, 0);
  strip.setPixelColor(1, 0, 100, 0);
  strip.setPixelColor(2, 0, 100, 0);
  strip.setPixelColor(3, 0, 100, 0);
  strip.setPixelColor(4, 0, 100, 0);
  strip.show();
  tone(8, NOTE_E4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //E
  strip.setPixelColor(0, 0, 100, 0);
  strip.setPixelColor(1, 0, 100, 0);
  strip.setPixelColor(2, 0, 100, 0);
  strip.setPixelColor(3, 0, 100, 0);
  strip.setPixelColor(4, 0, 100, 0);
  strip.show();
  tone(8, NOTE_E4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //E
  strip.setPixelColor(0, 0, 100, 0);
  strip.setPixelColor(1, 0, 100, 0);
  strip.setPixelColor(2, 0, 100, 0);
  strip.setPixelColor(3, 0, 100, 0);
  strip.setPixelColor(4, 0, 100, 0);
  strip.show();
  tone(8, NOTE_E4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);


}

void tune3(){
  strip.begin();
  strip.show();
  
  // We initalize the NeoPixel Library here, by starting it and then sending the first strip.show() command.
  // Next we will tell all of the LEDs to switch off before continuing.
  
  pcr(); // PixelColorsReset function, it turns all of the LEDs completely off.
         // This custom function can be found at the bottom of this Sketch.

  // We play the melody once during setup with all 5 LEDs lighting up in the color for the tone being played.
  

  
  //E
  strip.setPixelColor(0, 0, 0, 100);
  strip.setPixelColor(1, 0, 0, 100);
  strip.setPixelColor(2, 0, 0, 100);
  strip.setPixelColor(3, 0, 0, 100);
  strip.setPixelColor(4, 0, 0, 100);
  strip.show();
  tone(8, NOTE_E4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //D
  strip.setPixelColor(0, 0, 0, 100);
  strip.setPixelColor(1, 0, 0, 100);
  strip.setPixelColor(2, 0, 0, 100);
  strip.setPixelColor(3, 0, 0, 100);
  strip.setPixelColor(4, 0, 0, 100);
  strip.show();
  tone(8, NOTE_D4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //D
  strip.setPixelColor(0, 0, 0, 100);
  strip.setPixelColor(1, 0, 0, 100);
  strip.setPixelColor(2, 0, 0, 100);
  strip.setPixelColor(3, 0, 0, 100);
  strip.setPixelColor(4, 0, 0, 100);
  strip.show();
  tone(8, NOTE_D4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //E
  strip.setPixelColor(0, 0, 0, 100);
  strip.setPixelColor(1, 0, 0, 100);
  strip.setPixelColor(2, 0, 0, 100);
  strip.setPixelColor(3, 0, 0, 100);
  strip.setPixelColor(4, 0, 0, 100);
  strip.show();
  tone(8, NOTE_E4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //D
  strip.setPixelColor(0, 0, 0, 100);
  strip.setPixelColor(1, 0, 0, 100);
  strip.setPixelColor(2, 0, 0, 100);
  strip.setPixelColor(3, 0, 0, 100);
  strip.setPixelColor(4, 0, 0, 100);
  strip.show();
  tone(8, NOTE_D4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);

  //C
  strip.setPixelColor(0, 0, 0, 100);
  strip.setPixelColor(1, 0, 0, 100);
  strip.setPixelColor(2, 0, 0, 100);
  strip.setPixelColor(3, 0, 0, 100);
  strip.setPixelColor(4, 0, 0, 100);
  strip.show();
  tone(8, NOTE_C4); // this starts the tone
  delay(wait);
  noTone(8); // this stops the tone
  pcr();
  delay(wait/10);
}


  
void pcr() {
  // This function turns all the LEDs off, reseting them.
  // I wrote this function to overcome the only real shortcomming I saw in the Adafruit Library, a reset command.
  strip.setPixelColor(0, 0, 0, 0);
  strip.setPixelColor(1, 0, 0, 0);
  strip.setPixelColor(2, 0, 0, 0);
  strip.setPixelColor(3, 0, 0, 0);
  strip.setPixelColor(4, 0, 0, 0);
  strip.show();
  return;
}

void notes() {
  
  // This function plays the melody, lighting up only the LED that corresponds to the tone played.
  pcr();
  strip.setPixelColor(0, 100, 0, 0);
  strip.setPixelColor(1, 0, 0, 0);
  strip.setPixelColor(2, 0, 0, 0);
  strip.setPixelColor(3, 0, 0, 0);
  strip.setPixelColor(4, 0, 0, 0);
  strip.show();
  tone(8, NOTE_G4);
  delay(wait);
  noTone(8);
  pcr();
  delay(wait/10);
  
  strip.setPixelColor(0, 0, 0, 0);
  strip.setPixelColor(1, 170, 80, 10);
  strip.setPixelColor(2, 0, 0, 0);
  strip.setPixelColor(3, 0, 0, 0);
  strip.setPixelColor(4, 0, 0, 0);
  strip.show();
  tone(8, NOTE_A4);
  delay(wait);
  noTone(8);
  pcr();
  delay(wait/10);
  
  strip.setPixelColor(0, 0, 0, 0);
  strip.setPixelColor(1, 0, 0, 0);
  strip.setPixelColor(2, 120, 0, 200);
  strip.setPixelColor(3, 0, 0, 0);
  strip.setPixelColor(4, 0, 0, 0);
  strip.show();
  tone(8, NOTE_F4);
  delay(wait);
  noTone(8);
  pcr();
  delay(wait/10);
  
  strip.setPixelColor(0, 0, 0, 0);
  strip.setPixelColor(1, 0, 0, 0);
  strip.setPixelColor(2, 0, 0, 0);
  strip.setPixelColor(3, 128, 120, 0);
  strip.setPixelColor(4, 0, 0, 0);
  strip.show();
  tone(8, NOTE_F3);
  delay(wait);
  noTone(8);
  pcr();
  delay(wait/10);
  
  strip.setPixelColor(0, 0, 0, 0);
  strip.setPixelColor(1, 0, 0, 0);
  strip.setPixelColor(2, 0, 0, 0);
  strip.setPixelColor(3, 0, 0, 0);
  strip.setPixelColor(4, 140, 180, 180);
  strip.show();
  tone(8, NOTE_C4);
  delay(wait);
  noTone(8);
  pcr();
  return;

}

Credits

Liam Varner
2 projects • 1 follower
Contact
Michael Noonan
1 project • 0 followers
Contact
Thanks to Dain Unicorn.

Comments

Please log in or sign up to comment.