This is finally the post for my headtracking system. I still have some tweaking ahead, but here is the present situation.
It is based on following components:
- Arduino compatible board (I use a spare ArduPilot board) in the airframe
- Arduino compatible board on the ground (I use a Arduino Pro Mini from Sparkfun)
- Nunchuck Wii console handle
- 2 Xbee Pro Rf modems
- a camera on a pan and tilt system
- a cheapo digital camera hacked with a simple transistor shutter
- some cables, some resistors, some plastic box to fit components in, etc.
Ground headtracking unit features:
- basic headtracking using 2 accelerometers from the Nunchuck device (panning occurs while tilting head sideways; no rotational movement because no compass/gyro is implemented; I got used to this side movement which felt strange at first)
- accelerometer data average for smoothing movements
- accelerometer circuit on the head (fixed to a baseball cap)
- 2 possible calibrations of the accelerometer unit (device or user)
- Nunchuck handle in the hand for following specific actions when in autopilot:
- front view with square button
- bottom view with oval button
- digital camera shutter with both buttons
- two axis joystick trim to center camera position at will
- visual (led) and audible (buzzer) feedback on handle actions
- powered with a 2 cell 1000 mAh lipo
- voltage monitoring with audible alarms (2 levels: 3.3v/cell and 3.1v/cell)
- accelerometer data segregation to keep serial data rate very low
Airborne system includes:
- 180 degrees camera pan
- 90 degrees camera tilt (from front view to bottom view)
- automatic front view after 10 seconds without headtracking data
- digital camera shutter from ArduPilot digital pin D13
Well, I think that's all for the features. I am sure there could be a lot of improvement in the code. I am no programmer, so I tried to do it and document it as best as I could.
There are two code parts:
- ground headtracker: head_track.pde
- airborne system: pan_tilt.pde
I tried to record some video with my digital camera, but the light was so bad in my living room (in the evening), that I'll postpone posting a video. Instead, I added pictures into my gallery so you may check them out.
this project is largely based on the code posted by Andrea Salvatore
. Thanks Andrea for the nice How To.
So I started using code written by others and modified it on the fly. If you recognize parts of your code, please don't be mad at me but send me a note instead, so I can duly acknowledge your contribution here and in the code. Thanks for your understanding.