Skip to content

ArduinoPCP/finalProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

THE JANITOR 2.0

Introduction

The Janitor 2.0 is the ultimate cleaning robot that acts in every way as a school Janitor! He complains a lot when he needs to start working, tries to delay the job as much as he can, and when it finally starts, he stops every 5 seconds to tell unfunny jokes. Unpleasant and annoying, as we like!

Concept

  • It behaves like a janitor!
  • It keeps complaining and it is not in the mood to start its job.
  • When it starts cleaning, then it makes bad jokes.

Design

The 3D model was developed using the software Fusion 360 and then the slicing was done with Cura. The model has been printed at the Bitz unibz fablab.

Electronics design

  • The tool Fritzing was used for prototyping.
  • Instead of the button a potentiometer has been used. This made it easier to attach it to the lid and use long cables.
  • There are two 360° Servomotors in order to implement the movements of the robot.

The voice

  • The jokes that the robot says have been found on different websites.
  • And with an AI on Internet, the voice was generated.
  • The DFPlayer Mini library allowed to play and control MP3 files. Those are taken from the SD card.

The code

Have a look at the complete code here!

void loop() {

  //the robot is off, waiting for the user to turn it on
  while(working == 0) {
    if(robotIsWorking()==true)
      working = 1;
  }
  
  //the robot is on, and it will start "cleaning"
  Serial.println("Robot is working");
  execute();

}

This loop is where the robot is activated by the user. A person has to press the button on top of the robot. Sometimes this take multiples trials and the robot might even complain in the meanwhile.

void execute() {
  powerMotorRandom();
  delay(3000);
  stopMotor();
  myDFPlayer.play(random(3,11));
  delay(12000);
  myDFPlayer.pause();
  delay(800);
}

execute is the function responsible for what the robot does once it is on:

  • the robot moves randomly for three seconds. There are four possible movements;
  • it stops for twelve seconds to say a joke;
  • and it repeat forever.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages