For midterm project we came up with an idea of a Fortune-teller robot, that responds to user the questions by printing predictions. The predictions will be dark, we tought this will be more convenient for Halloween concept. It will also have the ability to detect whether the user is approaching close to it..
DESIGN
It will be a box from wooden which later on we’ll cover it with another material to make it look like a robot. We’re going to make a whole for the ultrasonic sensor and for the printer paper. We also gonna make wholes on the top of the box, for LED’s which will turn on with distance detection. So that the ultrasonic sensor looks like eyes, printer looks like mouth and LED’s for the hair.
COMPONENTS
Arduino Uno: We planned to use NANO but it turned out that thermal printers would normally need from 5 to 9 Volts to print dark and readable letters.
Adafruit Thermal Printer: We bought Product ID:2753. Inspide of trying everything, we couldn’t make it work. Then, thanks for our friend August, we borrowed another version. Product ID: 600, tested it successfully and gonna use it for our circuit. So, for the first week of the project, we had success on testing the product after spending a whole Thursday. On the product sheet, it was written that this particular printer doesn’t need to have a power supply. It look us a lot of time to figure it out. Test code for Arduino is available after downloading Adafruit Thermal Printers library from Adafruitwebsite. Than expels can be reached from Arduino-File-Examples.
Ultrasonic Sensor: It is going to be used for the distance detection of the user. When someone get closer to the robot, the LED’s going to turn on.
LED’s
CODE
We are using Daniel Shiffan’s Speech Recognition code with P5.Speech. It is a p5.js library. So, we made the code continuously listening and giving back text of the speech.
You can reach the code we’ve so far below.
https://editor.p5js.org/bestesaylar/sketches/ZhG66Ds0J
*It still needs to be worked on. We need an array of keywords. So, during the speech ,an event listener willl detect the keywords and depending on these keywords, it will choose random answers from an answer array.
So, we are not going to write answers as text in Arduino code. Answers will be sent by specific keywords or numbers to the Arduino for serial communication reasons.
PROCESS