AUTHOR: Shyam
1 - Take images from picam with python script
2 - Look for how to connect Arduino, servo and Rpi
connect the camera
enable the camera raspi-config
verify the camera using command
raspistill -o Desktop/image.jpg
run the below script to record images
import picamera # Importing the library for camera module
from time import sleep
camera = picamera.PiCamera() # Setting up the camera
camera.start_preview()
sleep(5)
camera.capture('/home/pi/imag.jpg') # Capturing the image
camera.stop_preview()
For the making the prototype of head for this sprint we can use
Rpi & Arduino connected via USB
Arduino and Servo directly via GPIO or motor driver
#include <Servo.h>
Servo servo1;
Servo servo2;
Servo servo3;
Servo servo4;
int i = 0;
void setup() {
servo1.attach(3);
servo2.attach(5);
servo3.attach(6);
servo4.attach(9);
}
void loop() {
for (i = 0; i < 180; i++) {
servo1.write(i);
servo2.write(i);
servo3.write(i);
servo4.write(i);
delay(10);
}
for (i = 180; i > 0; i--) {
servo1.write(i);
servo2.write(i);
servo3.write(i);
servo4.write(i);
delay(10);
}
}
Tested serial communication between Arduino and Rpi with my hardware set up, yet to test with Circut Launch Rpi(remotely )
checking images recorded virtually
not sure with which connectoin to go with for Rpi, Arduino & Servo