CONTENTS

Home
Updates
Software
Electronics
Android / iOS
Videos
Music
Resume
Contact



HTTPS VERSION

Control A PTZ IP Camera With A Gamepad On Linux Example

Related pages on www.mikekohn.net: Naken Web, Linux PTZ Control, j2me ipcamview, Axis DBus

Introduction

This is a small program showing how to use Linux to control the PTZ motors on an IP based camera. This program has the ability to move Axis based IP cameras remotely from a Linux box using a Logitech based game pad such as the Logitech Dual Action Gamepad. Moving the left analog joystick left, right, up, down will turn the camera according to how hard the joystick is pressed. By moving the right joystick forward and back the camera will zoom in and out of the picture.

I was surprised how easy it was to write code for Linux to read from a joystick. I'm putting this online for anyone to use as an example. Feel free to use whatever code from this tarball that you want. This code can be easily modified to control other IP cameras, I used Axis simply because their API is freely available online and quite easy to use.

Download

This code is pretty buggy. I can't really fix it since I don't have access to an Axis camera, so owell :(. I did make a new version specific to another project I'm working on which will be included in my Atmel Pilot package.

ptz_control-2006-11-06.tar.gz

Copyright 1997-2018 - Michael Kohn