Previous posts
Post 2 - Installing OpenCV - Prerequisites
Post 5 - Installing eye tracker
Post 7 - SPI communication in Python
EyeLiner - Post 8 - Getting started with Kinetis
EyePrints - Post 9 - Mechanical design
The last part of the drawing robot is the plotter. The main purpose of this part is to hold the pencil and lift it up when painter wants to move the plotter without drawing anything on the paper
Here is a sketch of the idea
The main rational behind this design is cost reduction. I hope it will take a few hours of work to build and test.
The servo will be controlled by the Raspberry Pi board. When painter blinks his or her eyes, the pencil is lifted up. When painter blinks eyes again, the pencil goes back to the vertical position
Controlling the servo with Python is very easy thanks to the RPi library. Here is the code to move the servo (for a full tutorial about this code take a look here)
>>>import RPi.GPIO as GPIO >>>GPIO.setmode(GPIO.BOARD) >>>GPIO.setup(11,GPIO.OUT) >>>pwm=GPIO.PWM(11,50) >>>pwm.start(5) >>>pwm.ChangeDutyCycle(10)