luetzel / motion_eye_servo_action

Python scripts to add pan-tilt action buttons for motioneye using an Adafruit PCA9685 servo controller
GNU General Public License v3.0
6 stars 5 forks source link

servo settings #1

Open mazza8098 opened 5 years ago

mazza8098 commented 5 years ago

how do you set up the min max on the servos. when i press any button the servos just jump and go back to where they were.

luetzel commented 5 years ago

Simply edit files up_1, down_1, left_1, right_1 and change min/max values to your desired position. Here, I use cheap SG90 servos. You might have to use other values with other types of servos. Also make sure that *pos files have correct permissions, so that python scripts are able to store the current position.

# Configure min and max servo pulse lengths (450 total, 25 corresponds to 10 degrees) servo_min = 225 # Min pulse length out of 4096 servo_max = 725 # Max pulse length out of 4096

mazza8098 commented 5 years ago

Ok perfect I have it working with the same servos but it is very jumpy not smooth at all. Any ideas on how to fix it?

From: luetzel notifications@github.com Sent: Monday, January 21, 2019 11:02 PM To: luetzel/motion_eye_servo_action motion_eye_servo_action@noreply.github.com Cc: mazza8098 nathanmazza@hotmail.com; Author author@noreply.github.com Subject: Re: [luetzel/motion_eye_servo_action] servo settings (#1)

Simply edit files up_1, down_1, left_1, right_1 and change min/max values to your desired position. Here, I use cheap SG90 servos. You might have to use other values with other types of servos. Also make sure that *pos files have correct permissions, so that python scripts are able to store the current position.

Configure min and max servo pulse lengths (450 total, 25 corresponds to 10 degrees) servo_min = 225 # Min pulse length out of 4096 servo_max = 725 # Max pulse length out of 4096

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fluetzel%2Fmotion_eye_servo_action%2Fissues%2F1%23issuecomment-456291996&data=02%7C01%7C%7C9f484e7f9e7942d6524008d680377488%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636837372992184973&sdata=DCGNvrNJ5pgvbP7OwNFrUrABqrXC9nzVmHl39yGWDDw%3D&reserved=0, or mute the threadhttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAsvGm59VB02puaDhTCwTCcC5-CSdMSKqks5vFrdQgaJpZM4aLr1C&data=02%7C01%7C%7C9f484e7f9e7942d6524008d680377488%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636837372992184973&sdata=KC9wJlOp9TVdpSLCGs3klepStyoGDWfcLEvl5ePbYGI%3D&reserved=0.

luetzel commented 5 years ago

Did you hook up your servos using a controller board? https://learn.adafruit.com/adafruit-16-channel-servo-driver-with-raspberry-pi/hooking-it-up I strongly recommend to use a board with capacitor. It is also possible to control the enable pin of the board in order to disconnect all servos from power while they are not in use.

mazza8098 commented 5 years ago

Yes I used the control board listed. I plugged in all the wires listed as well including gpio 18 which I’m guessing is the on off wire.

Nathan Mazza

On Jan 22, 2019, at 2:22 PM, luetzel notifications@github.com<mailto:notifications@github.com> wrote:

Did you hook up your servos using a controller board? https://learn.adafruit.com/adafruit-16-channel-servo-driver-with-raspberry-pi/hooking-it-uphttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flearn.adafruit.com%2Fadafruit-16-channel-servo-driver-with-raspberry-pi%2Fhooking-it-up&data=02%7C01%7C%7C73f7e5b92b9f4122c0b708d680b80f54%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636837925346382629&sdata=gMxBWlU%2FifxqOcJzudaHqoD4bvWVJnM1TBtc1HduKKo%3D&reserved=0 I strongly recommend to use a board with capacitor. It is also possible to control the enable pin of the board in order to disconnect all servos from power while they are not in use.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fluetzel%2Fmotion_eye_servo_action%2Fissues%2F1%23issuecomment-456586113&data=02%7C01%7C%7C73f7e5b92b9f4122c0b708d680b80f54%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636837925346382629&sdata=L5mE44bW30iWP%2BcHXY%2BIKd4uhntUy4ReggBHDMS6x1w%3D&reserved=0, or mute the threadhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAsvGm-Y1_sEGL1wlQp0HZIZ0Ok1hXwaMks5vF48UgaJpZM4aLr1C&data=02%7C01%7C%7C73f7e5b92b9f4122c0b708d680b80f54%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636837925346382629&sdata=D1So1%2BVM%2FjCyMZntPrguB32aNxUvN%2Bs10Iokcr%2B9QNI%3D&reserved=0.