Project showcase
Tvc15 Robot

Tvc15 Robot

Just a dapper robot with an LED face that looks around and waves.

  • 459 views
  • 0 comments
  • 2 respects

Components and supplies

Necessary tools and machines

Apps and online services

About this project

It all started with a song.

Legend has it, when David Bowie was briefly living in Los Angeles, his good friend Iggy Pop was visiting him, complete with a skull full of hallucinogens. At the time, He apparently thought his girlfriend was being eaten by Bowie's new television. What songwriter worth their salt could pass up immortalizing this story? Not Bowie.And with that TVC15 became one of my favorite songs on one of my favorite albums, Station to Station.

My robot, the TVC15 is my personal homage to the song and the songwriter. It's also my introduction to interactive robotics.

The majority of his parts are 3D printed and designed in Autodesk Inventor. The TVC15 uses an Arduino mega for the brain. His face is 16x32 pixel LED matrix. Each arm has 3 servos, and the neck has 2, devoted to pan and tilt movement. Attached to the head is a 4 IR sensor array that feeds input to the Arduino.The Arduino takes the data and moves the neck servos accordingly. This is updated continuously. A "ping" sonar sensor determines if someone is approaching.If the sensor is tripped, the TVC15 will go through a routine where the led matrix run a sequence of animated lights.After the display, each hand will raise and wave to the spectator.

Future improvements: The LED matrix and servos tend to draw a lot of current.Batteries cannot hold a charge for long, and as a result, the robot is currently stationary, powered by a 5 volt 10 amp power supply. I would eventually like to move it to a mobile platform, and I am investigating the options available. For the time being, he's okay hanging out where he is.

Code

TVC15 Arduino
This code controls the TVC15's LED Matrix , sensors, and servo control. It's not elegant to say the least, but coding is still pretty abstract to me, and I'm learning. In any case, it does what I want it to :)
/******************************DECLARATIONS AND LIBRARIES*******************************/
#include <Servo.h>   
#include <Adafruit_GFX.h>   // Core graphics library
#include <RGBmatrixPanel.h> // Hardware-specific library  

#define CLK 11 // MUST be on PORTB! (Use pin 11 on Mega)
#define LAT A3
#define OE  9
#define A   A0
#define B   A1
#define C   A2

RGBmatrixPanel matrix(A, B, C, CLK, LAT, OE, false);

//long timerFace=0;//will store the length of time it takes before running the face routine
//long timetoWait=500;//length of time before running the face routine
Servo panServo;
Servo tiltServo;
Servo Lshoulder;  // create servo object to control a servo 
Servo Lelbow;  // create servo object to control a servo
Servo Lthumb;  // create servo object to control a servo 
Servo Rshoulder;  // create servo object to control a servo 
Servo Relbow;  // create servo object to control a servo
Servo Rthumb;  // create servo object to control a servo 
int pos = 0;    // variable to store the servo position                 
// variables:

const int UPsensorPin4 = A4; //"UP"EYE YELLOW WIRE
const int LEFTsensorPin5 = A5;//"LEFT" EYE ORANGE WIRE
const int RIGHTsensorPin6 = A6;//"RIGHT"EYE BROWN WIRE
const int DOWNsensorPin7 = A7;//"DOWN" EYEBLUE WIRE
int IRleds= 6  ;//purple
int pingPin = 41;

/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/****************************SERVO POSITION*******************************************/  

 int POS = 30;          // assigned value
 int POS1 = 60;         // assigned value
 int POS2 = 90;           // assigned value

/************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/******************************THE WAVE ROUTINE***************************************/


long timer=0;//will store the length of time it takes before running the wave routine
long timetoWait=500;//length of time before running the wave routine

/************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/*****************************THE SETUP ROUTINE**************************************/ 


void setup() {
panServo.attach(44);
tiltServo.attach(45);

 
    
    
      
       Rthumb.attach(12);  // attaches the servo on pin 12 to the servo object
//timerFace = millis();//start the timer
  // initialize serial communication at 9600 bits per second:
// Serial.begin(9600);

  
timer = millis();//start the timer 
  face();

 
    coldstar();
     
}
/***********************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/**********************************PRIMARY LOOP*************************************/

void loop() 
{


 
  // calibrate during the first five seconds 
 // while (millis() < 5000);

 int  UPsensorValue= analogRead(UPsensorPin4);
int  LEFTsensorValue= analogRead(LEFTsensorPin5);
 int  RIGHTsensorValue= analogRead(RIGHTsensorPin6);
  int  DOWNsensorValue= analogRead(DOWNsensorPin7);
   
   
//Serial.println(LEFTsensorValue); // the raw analog reading
//Serial.println(RIGHTsensorValue); // the raw analog reading

    // delay(100);


if (LEFTsensorValue>RIGHTsensorValue){

   panServo.write(POS1);              // tell servo to go to position in variable 'pos' 
    LEFT();
    delay(100);                       // waits 15ms for the servo to reach the position 
  } else if (LEFTsensorValue<RIGHTsensorValue) {  
    panServo.write(POS2);              // tell servo to go to position in variable 'pos'           
    RIGHT();
    delay(100);
  }else{
      panServo.write(POS);   
    }
     
    

   
     
     
  if     (UPsensorValue>DOWNsensorValue) {     
    
    tiltServo.write(POS2);              // tell servo to go to position in variable 'pos' 
    DOWN();
    delay(100);                       // waits 15ms for the servo to reach the position 
  } else if (UPsensorValue<DOWNsensorValue){     
    tiltServo.write(POS1);              // tell servo to go to position in variable 'pos' 
    UP();
    delay(100);    // waits 15ms for the servo to reach the position 
    }else{
       panServo.write(POS2);   
    }

    
        long duration, inches, cm; 
  pinMode(pingPin, OUTPUT);
  digitalWrite(pingPin, LOW);
  delayMicroseconds(2);
  digitalWrite(pingPin, HIGH);
  delayMicroseconds(5);
  digitalWrite(pingPin, LOW);
  pinMode(pingPin, INPUT);
  duration = pulseIn(pingPin, HIGH);
   
  inches = microsecondsToInches(duration);
  cm = microsecondsToCentimeters(duration);
   
// Serial.print(inches);
 // Serial.print("in, ");
 // Serial.print(cm);
//  Serial.print("cm");
//  Serial.println();
    delay(100);
  while (timer >timetoWait); 
  
  //Serial.print("The Random Number is = ");
 // Serial.println(A13);
   if (inches <=(6))  
 
     
 
   
   wave();
     
     
     
} 

/*************************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/*******************************************FACE SETUP********************************************/



void face ()
{

matrix.begin();
   // red portion of lightning bolt
  matrix.drawLine(30, 3, 30, 8, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawLine(29, 2, 29, 8, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawLine(28, 2, 28, 7, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawLine(27, 2, 27, 7, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawLine(26, 1, 26, 6, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawLine(25, 1, 25, 5, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawPixel(24, 1, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawLine(24, 5, 24, 7, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawPixel(23, 7, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawPixel(22, 7, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawPixel(21,5,matrix.Color333(7,0,0));
  delay(50);
  matrix.drawLine(20, 2, 20, 6, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawLine(19, 2, 19, 3, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawPixel(19, 6, matrix.Color333(7,0,0));
  delay(50);
  matrix.drawLine(18, 2, 18, 3, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawPixel(18, 6, matrix.Color333(7,0,0));
  delay(50);
  matrix.drawPixel(17, 2, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawPixel(17,6, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawLine(16, 5, 16, 6, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawLine(15, 4, 15,5, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawPixel(14, 4, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawPixel(14, 3, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawPixel(13, 3, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawPixel(12, 3, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawPixel(11, 3, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawPixel(10, 3, matrix.Color333(7, 0, 0));
  delay(50);
  matrix.drawPixel(9, 3, matrix.Color333(7, 0, 0));
  delay(50);
  //purple lightning bolt and eye highlights
  matrix.drawPixel(30, 2, matrix.Color333(7, 0, 7));
  delay(50);
  matrix.drawPixel(29, 1, matrix.Color333(7, 0, 7));
  delay(50);
  matrix.drawPixel(28, 1, matrix.Color333(7, 0, 7));
  delay(50);
  matrix.drawPixel(27, 1, matrix.Color333(7, 0, 7));
  delay(50);
  matrix.drawPixel(26, 0, matrix.Color333(7, 0, 7));
  delay(50);
  matrix.drawPixel(25, 0, matrix.Color333(7, 0, 7));
  delay(50);
  // eyelids
  matrix.drawPixel(24, 0, matrix.Color333(7, 0, 7));
  delay(50);
  matrix.drawLine(24, 3, 24, 4, matrix.Color333(7, 0, 7));
  delay(50);
  matrix.drawLine(24, 11, 24, 13, matrix.Color333(7, 0, 7));
  delay(50);
  matrix.drawLine(23, 2, 23,3 , matrix.Color333(7, 0, 7));
  delay(50);
  matrix.drawLine(23, 9, 23,10 , matrix.Color333(7, 0, 7));
  delay(50);
  matrix.drawLine(23, 13, 23,14 , matrix.Color333(7, 0, 7));
  delay(50);
  //lowerbolt highlight
  

  // dark  accents
  matrix.drawPixel(30,8,matrix.Color333(0,0,0));
  delay(50);
   matrix.drawPixel(28,7,matrix.Color333(0,0,0));
   delay(50);
  matrix.drawPixel(26,6,matrix.Color333(0,0,0));
  delay(50);
   matrix.drawPixel(25,5,matrix.Color333(0,0,0));
   delay(50);
  matrix.drawPixel(22,9,matrix.Color333(0,0,0));
  delay(50);
   matrix.drawPixel(22,13,matrix.Color333(0,0,0));
   delay(50);
  matrix.drawLine(21, 10, 21,12 , matrix.Color333(0,0,0));
  delay(50);
   matrix.drawPixel(19,9,matrix.Color333(0,0,0));
   delay(50);
  matrix.drawPixel(18,9,matrix.Color333(0,0,0));
  delay(50);
   matrix.drawPixel(17,9,matrix.Color333(0,0,0));
   delay(50);
  matrix.drawPixel(14,9,matrix.Color333(0,0,0));
  delay(50);
   matrix.drawLine(13,7,13,8 , matrix.Color333(0,0,0));
   delay(50);
  matrix.drawPixel(12,12,matrix.Color333(0,0,0));
  delay(50);
   matrix.drawPixel(11,11,matrix.Color333(0,0,0));
   delay(50);
  matrix.drawPixel(9,6,matrix.Color333(0,0,0));
  delay(50);
   matrix.drawLine(9,8,9,9,matrix.Color333(0,0,0));
   delay(50);
  matrix.drawPixel(8,11,matrix.Color333(0,0,0)); 
  delay(50);
   matrix.drawLine(7,5,7,6,matrix.Color333(0,0,0));
   delay(50);
  matrix.drawLine(7,8,7,10, matrix.Color333(0,0,0));
  delay(50);
   matrix.drawPixel(7,13,matrix.Color333(0,0,0));
   delay(50);
  matrix.drawLine(6,6,6,9, matrix.Color333(0,0,0));
  delay(50);
   matrix.drawPixel(5,2,matrix.Color333(0,0,0));
   delay(50);
  matrix.drawPixel(5,12,matrix.Color333(0,0,0));
  delay(50);
   matrix.drawPixel(4,12,matrix.Color333(0,0,0));
   delay(50);
  matrix.drawPixel(3,4,matrix.Color333(0,0,0));
  delay(50);
   matrix.drawPixel(2,5,matrix.Color333(0,0,0));
   delay(50);
  matrix.drawLine(1,8,1,10,matrix.Color333(0,0,0));
  delay(50);
  
  //sideburns and inner lip color.should be pink
  
   matrix.drawPixel(30,0,matrix.Color333(7,0,3));
   delay(50);
  matrix.drawPixel(30,15,matrix.Color333(7,0,3));
  delay(50);
   matrix.drawPixel(29,0,matrix.Color333(7,0,3));
   delay(50);
  matrix.drawPixel(29,15,matrix.Color333(7,0,3));
  delay(50);
   matrix.drawPixel(28,0,matrix.Color333(7,0,3));
   delay(50);
  matrix.drawPixel(28,15,matrix.Color333(7,0,3));
  delay(50);
   matrix.drawPixel(27,0,matrix.Color333(7,0,3));
  delay(50);
  matrix.drawPixel(27,15,matrix.Color333(7,0,3));
  delay(50);
   matrix.drawPixel(26,0,matrix.Color333(7,0,3));
   delay(50);
  matrix.drawPixel(26,15,matrix.Color333(7,0,3));
  delay(50);
   matrix.drawPixel(25,0,matrix.Color333(7,0,3));
  delay(50);
  matrix.drawPixel(25,15,matrix.Color333(7,0,3));
  delay(50);
    matrix.drawPixel(24,0,matrix.Color333(7,0,3));
  delay(50);
  matrix.drawPixel(24,15,matrix.Color333(7,0,3));
  delay(50);
    matrix.drawPixel(23,0,matrix.Color333(7,0,3));
  delay(50);
  matrix.drawPixel(23,15,matrix.Color333(7,0,3));
  delay(50);
    matrix.drawPixel(22,0,matrix.Color333(7,0,3));
   delay(50);
  matrix.drawPixel(22,15,matrix.Color333(7,0,3));
  delay(50);
    matrix.drawPixel(21,0,matrix.Color333(7,0,3));
   delay(50);
  matrix.drawPixel(21,15,matrix.Color333(7,0,3));
  delay(50);
    matrix.drawPixel(20,0,matrix.Color333(7,0,3));
  delay(50);
  matrix.drawPixel(20,15,matrix.Color333(7,0,3));
  delay(50);
    matrix.drawPixel(19,0,matrix.Color333(7,0,3));
  delay(50);
  matrix.drawPixel(19,15,matrix.Color333(7,0,3));
  delay(50);
    matrix.drawPixel(18,0,matrix.Color333(7,0,3));
  delay(50);  
  matrix.drawPixel(18,15,matrix.Color333(7,0,3));
  delay(50);
    matrix.drawPixel(17,0,matrix.Color333(7,0,3));
  delay(50); 
  matrix.drawPixel(17,15,matrix.Color333(7,0,3));
  delay(50);
   matrix.drawLine(8,5,8,11,matrix.Color333(7,0,3));
  delay(50); 
   matrix.drawLine(7,7,7,9,matrix.Color333(7,0,3));
  delay(50); 
   
   //primary skin color
   
   matrix.drawLine(30,1,30,3,matrix.Color333(0,0,3));
   delay(50);
   matrix.drawLine(30,11,30,14,matrix.Color333(0,0,3));
   delay(50);
   matrix.drawPixel(29,1,matrix.Color333(0,0,3));
   delay(50);
   matrix.drawLine(29,9,29,14,matrix.Color333(0,0,3));
   delay(50);
   matrix.drawPixel(28,1,matrix.Color333(0,0,3));
   delay(50);
   matrix.drawLine(28,9,28,14,matrix.Color333(0,0,3));
   delay(50);
   matrix.drawPixel(27,1,matrix.Color333(0,0,3));
   delay(50);
   matrix.drawLine(27,8,27,14,matrix.Color333(0,0,3));
   delay(50);
   matrix.drawLine(26,8,26,14,matrix.Color333(0,0,3));
   delay(50);
   matrix.drawLine(25,7,25,14,matrix.Color333(0,0,3));
   delay(50);
   matrix.drawLine(24,8,24,10,matrix.Color333(0,0,3));
   delay(50);
    matrix.drawPixel(24,14,matrix.Color333(0,0,3));
    delay(50);
    matrix.drawPixel(23,1,matrix.Color333(0,0,3));
    delay(50);
    matrix.drawLine(23,8,23,9,matrix.Color333(0,0,3));
    delay(50);
    matrix.drawPixel(22,1,matrix.Color333(0,0,3));
    delay(50);
     matrix.drawLine(22,8,22,9,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawPixel(21,1,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(21,7,21,10,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawPixel(21,14,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawPixel(20,1,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(20,7,20,14,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawPixel(19,1,matrix.Color333(0,0,3));
     delay(50);       
     matrix.drawPixel(19,5,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(19,7,19,8,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(19,10,19,14,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawPixel(18,1,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawPixel(18,5,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(18,7,18,8,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(18,10,18,14,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawPixel(17,1,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(17,3,17,4,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(17,7,17,8,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(17,10,17,14,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(16,1,16,4,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(16,7,16,14,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(15,1,15,3,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(15,5,15,14,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(14,1,14,2,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(14,4,14,9,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(14,11,14,14,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(13,1,13,2,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(13,4,13,7,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(13,10,13,14,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(12,1,12,2,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(12,4,12,13,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(11,1,11,2,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(11,4,11,12,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawPixel(11,14,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawPixel(10,2,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(10,4,10,14,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawPixel(9,2,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(9,4,9,7,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawPixel(9,8,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(9,11,9,14,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(8,2,8,4,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawPixel(8,13,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(7,2,7,5,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(7,12,7,13,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(6,2,6,6,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(6,10,6,13,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(5,4,5,12,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(4,4,4,11,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(3,5,3,11,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(2,6,2,11,matrix.Color333(0,0,3));
     delay(50);
     matrix.drawLine(1,6,1,7,matrix.Color333(0,0,3));
     delay(50);
     
     
     //pupils
     matrix.drawPixel(22,4,matrix.Color333(7,7,7));
     matrix.drawPixel(22,12,matrix.Color333(7,7,7));
     delay(1000);
     
     //black
     matrix.fillScreen(matrix.Color333(0, 0, 0));
     
          //pupils
     matrix.drawPixel(22,4,matrix.Color333(7,7,7));
     matrix.drawPixel(22,12,matrix.Color333(7,7,7));
     delay(1000);
               //pupils
     matrix.drawPixel(22,4,matrix.Color333(0,0,0));
     delay(50);
     matrix.drawPixel(22,12,matrix.Color333(7,7,7));
     delay(50);
      matrix.drawPixel(22,12,matrix.Color333(0,0,0));
      delay(50);
     matrix.drawPixel(21,11,matrix.Color333(7,7,7));
     delay(50);
     matrix.drawPixel(21,11,matrix.Color333(0,0,0));
     delay(50);
     matrix.drawPixel(20,10,matrix.Color333(7,7,7));
     delay(50);
     matrix.drawPixel(20,10,matrix.Color333(0,0,0));
     delay(50);
      matrix.drawPixel(19,9,matrix.Color333(7,7,7));
      delay(50);
      matrix.drawPixel(19,9,matrix.Color333(0,0,0));
      delay(50);
       matrix.drawPixel(18,8,matrix.Color333(7,7,7));
       delay(50);
       matrix.drawPixel(18,8,matrix.Color333(0,0,0));
       delay(50);
        matrix.drawPixel(17,7,matrix.Color333(7,7,7));
     delay(1000);
       matrix.fillScreen(matrix.Color333(0, 0, 0));
      delay(100);
      return ;
    // whew!
}
/***********************END FACE*********************/


/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/



/***********************COLDSTAR*********************/

 void coldstar()

{
  matrix.drawPixel(16,7, matrix.Color333(7,7,7));
  
           
/********************eyebrow*************************/
                  
  matrix.drawLine(18,1,18,2, matrix.Color333(7,0,0));
  matrix.drawPixel(19,2, matrix.Color333(7,0,0)); 
  matrix.drawPixel(20,3, matrix.Color333(7,0,0));
  matrix.drawLine(21,4,21,10, matrix.Color333(7,0,0));
  matrix.drawPixel(20,11, matrix.Color333(7,0,0));
  matrix.drawPixel(19,12, matrix.Color333(7,0,0));
  matrix.drawLine(18,13,18,14, matrix.Color333(7,0,0));

/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/

/***********************eyelid***********************/

  matrix.drawLine(15,2,15,4, matrix.Color333(7,0,0));
  matrix.drawPixel(16,3, matrix.Color333(7,0,0));
  matrix.drawPixel(17,4, matrix.Color333(7,0,0));
  matrix.drawPixel(18,5, matrix.Color333(7,0,0));
  matrix.drawLine(19,5,19,9, matrix.Color333(7,0,0));
  matrix.drawPixel(18,10, matrix.Color333(7,0,0));
  matrix.drawPixel(17,11, matrix.Color333(7,0,0));
  matrix.drawLine(16,12,16,14, matrix.Color333(7,0,0));
  matrix.drawPixel(15,11, matrix.Color333(7,0,0));
  matrix.drawPixel(14,10, matrix.Color333(7,0,0));
  matrix.drawLine(13,9,13,4, matrix.Color333(7,0,0));
  matrix.drawLine(14,4,8,4, matrix.Color333(7,0,0));
  matrix.drawLine(12,3,11,3, matrix.Color333(7,0,0));
  matrix.drawLine(12,6,9,9, matrix.Color333(7,0,0));
  matrix.drawLine(8,10,8,12, matrix.Color333(7,0,0));
  matrix.drawLine(9,13,11,13, matrix.Color333(7,0,0));
  matrix.drawPixel(11,12, matrix.Color333(7,0,0));

/***************************************************************************************/

  
  delay(1000);
    matrix.fillScreen(matrix.Color333(0, 0, 0));    
}

/*********************END COLDSTAR*******************/


/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/

/*********************DOWN**************************/

void DOWN ()
{
  /**********  step -1 eye moves down***********/

/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/   
                  
 /****************eyebrow*************************/
                  
  matrix.drawLine(18,1,18,2, matrix.Color333(7,0,0));
  matrix.drawPixel(19,2, matrix.Color333(7,0,0)); 
  matrix.drawPixel(20,3, matrix.Color333(7,0,0));
  matrix.drawLine(21,4,21,10, matrix.Color333(7,0,0));
  matrix.drawPixel(20,11, matrix.Color333(7,0,0));
  matrix.drawPixel(19,12, matrix.Color333(7,0,0));
  matrix.drawLine(18,13,18,14, matrix.Color333(7,0,0));



/***************************************************************************************/


/****************eyelid*************************/

  matrix.drawLine(15,2,15,4, matrix.Color333(7,0,0));
  matrix.drawPixel(16,3, matrix.Color333(7,0,0));
  matrix.drawPixel(17,4, matrix.Color333(7,0,0));
  matrix.drawPixel(18,5, matrix.Color333(7,0,0));
  matrix.drawLine(19,5,19,9, matrix.Color333(7,0,0));
  matrix.drawPixel(18,10, matrix.Color333(7,0,0));
  matrix.drawPixel(17,11, matrix.Color333(7,0,0));
  matrix.drawLine(16,12,16,14, matrix.Color333(7,0,0));
  matrix.drawPixel(15,11, matrix.Color333(7,0,0));
  matrix.drawPixel(14,10, matrix.Color333(7,0,0));
  matrix.drawLine(13,9,13,4, matrix.Color333(7,0,0));
  matrix.drawLine(14,4,8,4, matrix.Color333(7,0,0));
  matrix.drawLine(12,3,11,3, matrix.Color333(7,0,0));
  matrix.drawLine(12,6,9,9, matrix.Color333(7,0,0));
  matrix.drawLine(8,10,8,12, matrix.Color333(7,0,0));
  matrix.drawLine(9,13,11,13, matrix.Color333(7,0,0));
  matrix.drawPixel(11,12, matrix.Color333(7,0,0));


/***************************************************************************************/

  

  /**********   eye ***********/
     
matrix.drawPixel(16,7, matrix.Color333(7,7,7));
   delay(50);
   matrix.fillScreen(matrix.Color333(0, 0, 0));
    delay(50);
   
   
   /**********  step -2eye moves down***********/

/***************************************************************************************/
  
                  
 /****************eyebrow*************************/
                  
  matrix.drawLine(18,1,18,2, matrix.Color333(7,0,0));
  matrix.drawPixel(19,2, matrix.Color333(7,0,0)); 
  matrix.drawPixel(20,3, matrix.Color333(7,0,0));
  matrix.drawLine(21,4,21,10, matrix.Color333(7,0,0));
  matrix.drawPixel(20,11, matrix.Color333(7,0,0));
  matrix.drawPixel(19,12, matrix.Color333(7,0,0));
  matrix.drawLine(18,13,18,14, matrix.Color333(7,0,0));


/***************************************************************************************/


/****************eyelid*************************/

  matrix.drawLine(15,2,15,4, matrix.Color333(7,0,0));
  matrix.drawPixel(16,3, matrix.Color333(7,0,0));
  matrix.drawPixel(17,4, matrix.Color333(7,0,0));
  matrix.drawPixel(18,5, matrix.Color333(7,0,0));
  matrix.drawLine(19,5,19,9, matrix.Color333(7,0,0));
  matrix.drawPixel(18,10, matrix.Color333(7,0,0));
  matrix.drawPixel(17,11, matrix.Color333(7,0,0));
  matrix.drawLine(16,12,16,14, matrix.Color333(7,0,0));
  matrix.drawPixel(15,11, matrix.Color333(7,0,0));
  matrix.drawPixel(14,10, matrix.Color333(7,0,0));
  matrix.drawLine(13,9,13,4, matrix.Color333(7,0,0));
  matrix.drawLine(14,4,8,4, matrix.Color333(7,0,0));
  matrix.drawLine(12,3,11,3, matrix.Color333(7,0,0));
  matrix.drawLine(12,6,9,9, matrix.Color333(7,0,0));
  matrix.drawLine(8,10,8,12, matrix.Color333(7,0,0));
  matrix.drawLine(9,13,11,13, matrix.Color333(7,0,0));
  matrix.drawPixel(11,12, matrix.Color333(7,0,0));

/***************************************************************************************/

  /**********   eye ***********/
     
matrix.drawPixel(15,7, matrix.Color333(7,7,7));
   delay(50);
   matrix.fillScreen(matrix.Color333(0, 0, 0));
    delay(50);
   

/***************************************************************************************/
      
       
    /**********  step -3eye moves down***********/
    
    /********** brow ***********/
                        
 /****************eyebrow*************************/
                  
  matrix.drawLine(18,1,18,2, matrix.Color333(7,0,0));
  matrix.drawPixel(19,2, matrix.Color333(7,0,0)); 
  matrix.drawPixel(20,3, matrix.Color333(7,0,0));
  matrix.drawLine(21,4,21,10, matrix.Color333(7,0,0));
  matrix.drawPixel(20,11, matrix.Color333(7,0,0));
  matrix.drawPixel(19,12, matrix.Color333(7,0,0));
  matrix.drawLine(18,13,18,14, matrix.Color333(7,0,0));

/***************************************************************************************/


/****************eyelid*************************/
  matrix.drawLine(15,2,15,4, matrix.Color333(7,0,0));
  matrix.drawPixel(16,3, matrix.Color333(7,0,0));
  matrix.drawPixel(17,4, matrix.Color333(7,0,0));
  matrix.drawPixel(18,5, matrix.Color333(7,0,0));
  matrix.drawLine(19,5,19,9, matrix.Color333(7,0,0));
  matrix.drawPixel(18,10, matrix.Color333(7,0,0));
  matrix.drawPixel(17,11, matrix.Color333(7,0,0));
  matrix.drawLine(16,12,16,14, matrix.Color333(7,0,0));
  matrix.drawPixel(15,11, matrix.Color333(7,0,0));
  matrix.drawPixel(14,10, matrix.Color333(7,0,0));
  matrix.drawLine(13,9,13,4, matrix.Color333(7,0,0));
  matrix.drawLine(14,4,8,4, matrix.Color333(7,0,0));
  matrix.drawLine(12,3,11,3, matrix.Color333(7,0,0));
  matrix.drawLine(12,6,9,9, matrix.Color333(7,0,0));
  matrix.drawLine(8,10,8,12, matrix.Color333(7,0,0));
  matrix.drawLine(9,13,11,13, matrix.Color333(7,0,0));
  matrix.drawPixel(11,12, matrix.Color333(7,0,0));


/***************************************************************************************/


  /**********   eye ***********/
     
matrix.drawPixel(14,7, matrix.Color333(7,7,7));
   delay(50);
   matrix.fillScreen(matrix.Color333(0, 0, 0));
    delay(50);
  
 

     
}


/*********************************END DOWN********************************************/


/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/


/*************************************UP**********************************************/


 void UP ()
 {
   
             
 /****************eyebrow*************************/
                  
  matrix.drawLine(18,1,18,2, matrix.Color333(7,0,0));
  matrix.drawPixel(19,2, matrix.Color333(7,0,0)); 
  matrix.drawPixel(20,3, matrix.Color333(7,0,0));
  matrix.drawLine(21,4,21,10, matrix.Color333(7,0,0));
  matrix.drawPixel(20,11, matrix.Color333(7,0,0));
  matrix.drawPixel(19,12, matrix.Color333(7,0,0));
  matrix.drawLine(18,13,18,14, matrix.Color333(7,0,0));

/***************************************************************************************/


/****************eyelid*************************/
  matrix.drawLine(15,2,15,4, matrix.Color333(7,0,0));
  matrix.drawPixel(16,3, matrix.Color333(7,0,0));
  matrix.drawPixel(17,4, matrix.Color333(7,0,0));
  matrix.drawPixel(18,5, matrix.Color333(7,0,0));
  matrix.drawLine(19,5,19,9, matrix.Color333(7,0,0));
  matrix.drawPixel(18,10, matrix.Color333(7,0,0));
  matrix.drawPixel(17,11, matrix.Color333(7,0,0));
  matrix.drawLine(16,12,16,14, matrix.Color333(7,0,0));
  matrix.drawPixel(15,11, matrix.Color333(7,0,0));
  matrix.drawPixel(14,10, matrix.Color333(7,0,0));
  matrix.drawLine(13,9,13,4, matrix.Color333(7,0,0));
  matrix.drawLine(14,4,8,4, matrix.Color333(7,0,0));
  matrix.drawLine(12,3,11,3, matrix.Color333(7,0,0));
  matrix.drawLine(12,6,9,9, matrix.Color333(7,0,0));
  matrix.drawLine(8,10,8,12, matrix.Color333(7,0,0));
  matrix.drawLine(9,13,11,13, matrix.Color333(7,0,0));
  matrix.drawPixel(11,12, matrix.Color333(7,0,0));
  matrix.drawPixel(16,7, matrix.Color333(7,7,7));


/***************************************************************************************/  
  
  delay(100);
    matrix.fillScreen(matrix.Color333(0, 0, 0));
   delay(10);

/***************************************************************************************/



  /**********  step -2 eye moves up***********/
  
/****************eyebrow*************************/
                  
  matrix.drawLine(18,1,18,2, matrix.Color333(7,0,0));
  matrix.drawPixel(19,2, matrix.Color333(7,0,0)); 
  matrix.drawPixel(20,3, matrix.Color333(7,0,0));
  matrix.drawLine(21,4,21,10, matrix.Color333(7,0,0));
  matrix.drawPixel(20,11, matrix.Color333(7,0,0));
  matrix.drawPixel(19,12, matrix.Color333(7,0,0));
  matrix.drawLine(18,13,18,14, matrix.Color333(7,0,0));

/***************************************************************************************/



/****************eyelid*************************/
  matrix.drawLine(15,2,15,4, matrix.Color333(7,0,0));
  matrix.drawPixel(16,3, matrix.Color333(7,0,0));
  matrix.drawPixel(17,4, matrix.Color333(7,0,0));
  matrix.drawPixel(18,5, matrix.Color333(7,0,0));
  matrix.drawLine(19,5,19,9, matrix.Color333(7,0,0));
  matrix.drawPixel(18,10, matrix.Color333(7,0,0));
  matrix.drawPixel(17,11, matrix.Color333(7,0,0));
  matrix.drawLine(16,12,16,14, matrix.Color333(7,0,0));
  matrix.drawPixel(15,11, matrix.Color333(7,0,0));
  matrix.drawPixel(14,10, matrix.Color333(7,0,0));
  matrix.drawLine(13,9,13,4, matrix.Color333(7,0,0));
  matrix.drawLine(14,4,8,4, matrix.Color333(7,0,0));
  matrix.drawLine(12,3,11,3, matrix.Color333(7,0,0));
  matrix.drawLine(12,6,9,9, matrix.Color333(7,0,0));
  matrix.drawLine(8,10,8,12, matrix.Color333(7,0,0));
  matrix.drawLine(9,13,11,13, matrix.Color333(7,0,0));
  matrix.drawPixel(11,12, matrix.Color333(7,0,0));
  
  matrix.drawPixel(17,7, matrix.Color333(7,7,7));

/***************************************************************************************/  
  
  delay(100);
    matrix.fillScreen(matrix.Color333(0, 0, 0));
   delay(10);

/***************************************************************************************/

  
/**********  step -3 eye moves up***********/
  
/****************eyebrow*************************/
                  
  matrix.drawLine(18,1,18,2, matrix.Color333(7,0,0));
  matrix.drawPixel(19,2, matrix.Color333(7,0,0)); 
  matrix.drawPixel(20,3, matrix.Color333(7,0,0));
  matrix.drawLine(21,4,21,10, matrix.Color333(7,0,0));
  matrix.drawPixel(20,11, matrix.Color333(7,0,0));
  matrix.drawPixel(19,12, matrix.Color333(7,0,0));
  matrix.drawLine(18,13,18,14, matrix.Color333(7,0,0));

/***************************************************************************************/

/****************eyelid*************************/

  matrix.drawLine(15,2,15,4, matrix.Color333(7,0,0));
  matrix.drawPixel(16,3, matrix.Color333(7,0,0));
  matrix.drawPixel(17,4, matrix.Color333(7,0,0));
  matrix.drawPixel(18,5, matrix.Color333(7,0,0));
  matrix.drawLine(19,5,19,9, matrix.Color333(7,0,0));
  matrix.drawPixel(18,10, matrix.Color333(7,0,0));
  matrix.drawPixel(17,11, matrix.Color333(7,0,0));
  matrix.drawLine(16,12,16,14, matrix.Color333(7,0,0));
  matrix.drawPixel(15,11, matrix.Color333(7,0,0));
  matrix.drawPixel(14,10, matrix.Color333(7,0,0));
  matrix.drawLine(13,9,13,4, matrix.Color333(7,0,0));
  matrix.drawLine(14,4,8,4, matrix.Color333(7,0,0));
  matrix.drawLine(12,3,11,3, matrix.Color333(7,0,0));
  matrix.drawLine(12,6,9,9, matrix.Color333(7,0,0));
  matrix.drawLine(8,10,8,12, matrix.Color333(7,0,0));
  matrix.drawLine(9,13,11,13, matrix.Color333(7,0,0));
  matrix.drawPixel(11,12, matrix.Color333(7,0,0));
  
  matrix.drawPixel(18,7, matrix.Color333(7,7,7));
  
  
  delay(100);
    matrix.fillScreen(matrix.Color333(0, 0, 0));
   delay(10);

/************************************END UP*******************************************/ 

/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/
/***************************************************************************************/ 



 }

/************************************LEFT*******************************************/ 
 
 void LEFT()
 { 
  /**********  step -1 eye movesleft***********/
  
/****************eyebrow*************************/

  matrix.drawLine(18,1,18,2, matrix.Color333(7,0,0));
  matrix.drawPixel(19,2, matrix.Color333(7,0,0)); 
...

This file has been truncated, please download it to see its full contents.

Comments

Similar projects you might like

Amazing 6WD Off-Road Robot | Arduino RC Robot

Project tutorial by Jithin Sanal

  • 9,978 views
  • 0 comments
  • 54 respects

Scriba Robot - A Printing Robot

Project in progress by RobinB

  • 2,696 views
  • 0 comments
  • 8 respects

Project 1: 2WD Obstacle Avoiding Robot

Project showcase by HDA Robotics

  • 36,749 views
  • 16 comments
  • 43 respects

VEPCRo - Vertical External Pole Climbing Robot

Project showcase by Pramod C Wickramasinghe

  • 9,359 views
  • 14 comments
  • 36 respects

MeArm Robot Arm - Your Robot - V1.0

Project tutorial by Benjamin Gray

  • 29,567 views
  • 4 comments
  • 42 respects

Arduino Obstacle Avoidance Robot with Ultrasonic HC-SR04

Project showcase by Jorge Rancé

  • 26,215 views
  • 9 comments
  • 50 respects
Add projectSign up / Login