AUTHOR: Shyam

Goal:

1 - Take images from picam with python script

2 - Look for how to connect Arduino, servo and Rpi

Outcome:

Recording images from picam:

  1. connect the camera

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/e264c52e-9b34-441b-9b05-f64e1ad577d7/connect-camera.gif

  2. enable the camera raspi-config

  3. verify the camera using command

    raspistill -o Desktop/image.jpg

  4. 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()

Connections for Arduino, Rpi & Servo

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);                      
  }

}

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/967fd442-a5f1-421d-b7a0-7673c56fd89c/arduino_with_3_servo_.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/3dfa0980-d724-4e72-b699-ab1f16cbc253/download.png

Tested serial communication between Arduino and Rpi with my hardware set up, yet to test with Circut Launch Rpi(remotely )

Issues got stuck at

checking images recorded virtually

not sure with which connectoin to go with for Rpi, Arduino & Servo