Forum >Cat-Bot
Cat-Bot

I used to dream of my kitty talking to me and now I am going to make my toy kitty react to my actions and even CHAT WITH ME!

Step 1: Schematic

Let's make a draft about the project.
Firstly I need a Raspberry Pi, which has a Linux OS, can compile Python and even has an access to the Internet. Secondary I would like to use Arduino to get some data as well as realize some basic physical reactions. Thirdly a webcam is required to capture user actions.
Finally is to make the connection to an AI chatbot.
Material List:
Raspberry Pi 3 Model B https://www.dfrobot.com/product-1419.html
5MP Night Vision Camera for Raspberry Pihttps://www.dfrobot.com/product-1295.html
DFRduino UNO R3 [similar as Arduino UNO R3 ]https://www.dfrobot.com/product-838.html
USB Cable A-B for Arduino Uno/Megahttps://www.dfrobot.com/product-134.html
Waterproof DS18B20 Sensor Kithttp://www.dfrobot.com.cn/community/for ... #pid106821
9g micro servo (1.6kg)https://www.dfrobot.com/product-255.html
and a monitor is required for Raspberry Pi
Step 2: Assembling


Just have everything in their right position.
Step 3: Initial Raspberry Pi

Just go through this Tutorial.
https://www.raspberrypi.org/learning/hardware-guide/.
Hint: Just install the Raspbian.
Step 4: Test the Pi-camera
Here is a test code from pythonprogramming.net:
Connect the Raspberry Pi and the Arduino Uno with the cable. After installing pySerial, reading data from Arduino is straightforward:
Step 6: Test the Sensor and the Servo on the Arduino
I have a temperature sensor which would give feedback when (you petting the kitty) the temperature reaches some pre-set height.



Step 7: Add Chatbot Functions
I decided to have the bot make some feedback when I petting it.
eg. 'Meow! Keep going that way.'
'Purrrrrr. How is your day today my slave?'
'STILL NO GIRLFRIEND!?'
So I wanna set each of those sentences a number and make a random function to print any of those sentences on my screen (I would use ssh to connect to the Raspberry Pi) after I was petting it for ten minutes or even longer.
Step 8: Update Your Code
Step 9: Package Everything and Put Them Into a Toy Kitty



Step 1: Schematic

Let's make a draft about the project.
Firstly I need a Raspberry Pi, which has a Linux OS, can compile Python and even has an access to the Internet. Secondary I would like to use Arduino to get some data as well as realize some basic physical reactions. Thirdly a webcam is required to capture user actions.
Finally is to make the connection to an AI chatbot.
Material List:
Raspberry Pi 3 Model B https://www.dfrobot.com/product-1419.html
5MP Night Vision Camera for Raspberry Pihttps://www.dfrobot.com/product-1295.html
DFRduino UNO R3 [similar as Arduino UNO R3 ]https://www.dfrobot.com/product-838.html
USB Cable A-B for Arduino Uno/Megahttps://www.dfrobot.com/product-134.html
Waterproof DS18B20 Sensor Kithttp://www.dfrobot.com.cn/community/for ... #pid106821
9g micro servo (1.6kg)https://www.dfrobot.com/product-255.html
and a monitor is required for Raspberry Pi
Step 2: Assembling


Just have everything in their right position.
Step 3: Initial Raspberry Pi
Just go through this Tutorial.
https://www.raspberrypi.org/learning/hardware-guide/.
Hint: Just install the Raspbian.
Step 4: Test the Pi-camera
Here is a test code from pythonprogramming.net:
Code: Select all
Step 5: PySerial Encapsulates the Access for the Serial Portimport io import picamera import cv2 import numpy #Create a memory stream so photos doesn't need to be saved in a file stream = io.BytesIO() #Get the picture (low resolution, so it should be quite fast) #Here you can also specify other parameters (e.g.:rotate the image) with picamera.PiCamera() as camera: camera.resolution = (320, 240) camera.capture(stream, format='jpeg') #Convert the picture into a numpy array buff = numpy.fromstring(stream.getvalue(), dtype=numpy.uint8) #Now creates an OpenCV image image = cv2.imdecode(buff, 1) #Load a cascade file for detecting faces face_cascade = cv2.CascadeClassifier('/usr/share/opencv/haarcascades/haarcascade_frontalface_alt.xml') #Convert to grayscale gray = cv2.cvtColor(image,cv2.COLOR_BGR2GRAY) #Look for faces in the image using the loaded cascade file faces = face_cascade.detectMultiScale(gray, 1.1, 5) print "Found "+str(len(faces))+" face(s)" #Draw a rectangle around every found face for (x,y,w,h) in faces: cv2.rectangle(image,(x,y),(x+w,y+h),(255,255,0),2) #Save the result image cv2.imwrite('result.jpg',image)
Connect the Raspberry Pi and the Arduino Uno with the cable. After installing pySerial, reading data from Arduino is straightforward:
Code: Select all
Hint: http://playground.arduino.cc/Interfacing/Python>>> import serial >>> ser = serial.Serial('/dev/tty.usbserial', 9600) >>> while True: ... print ser.readline() '1 Hello world!\r\n' '2 Hello world!\r\n' '3 Hello world!\r\n' Writing data to Arduino is easy too (the following applies to Python 2.x): >>> import serial # if you have not already done so >>> ser = serial.Serial('/dev/tty.usbserial', 9600) >>> ser.write('5')
Step 6: Test the Sensor and the Servo on the Arduino
I have a temperature sensor which would give feedback when (you petting the kitty) the temperature reaches some pre-set height.



Step 7: Add Chatbot Functions
I decided to have the bot make some feedback when I petting it.
eg. 'Meow! Keep going that way.'
'Purrrrrr. How is your day today my slave?'
'STILL NO GIRLFRIEND!?'
So I wanna set each of those sentences a number and make a random function to print any of those sentences on my screen (I would use ssh to connect to the Raspberry Pi) after I was petting it for ten minutes or even longer.
Step 8: Update Your Code
Step 9: Package Everything and Put Them Into a Toy Kitty


2022-02-22 21:54:23 Adriano robot car is the first official game on wheel it has a motor and processors and other parts i dream that my cat is chat with me and useful to have the contact list with these pictures. I need to download https://www.resumehelpservices.com/ this was the site that has acceleration firms to get the blog news among the arts and their services.
gemmacharlesworth
