Enalab Camera Drivers for SOS
You will find the SOS drivers for the Enalab Camera attached below. The attachment also includes a stripped-down version of SOS and an example application. The included version of PySOS is probably out of date, so if you are interested, please download the current version from the PySOS page.
Below is text copied/pasted from the included README. Note that the schematics for the camera board is attached at the end of this page.
ENALAB CAMERA DEMO VERSION 1.0
________________________________________________________________
DIRECTORY STRUCTURE
===================
In this folder you'll find the following 3 directories:
- argus-1.0 -> Where the code for the ENALAB board
can be found.
- sos-1.x -> A stripped-down version of our internal
branch of SOS.
- tools -> Command-line tools for talking to
SOS nodes and taking pictures.
INSTALLATION
============
To install the ENALAB Camera demo code on an iMote2:
$ cd argus-1.0/config/camerademo
$ make clean
$ make imote2 ADDRESS=2 install
The camera node should turn on the green LED when it boots. To
install the NIC code on an iMote2:
$ cd argus-1.0/config/base
$ make clean
$ make imote2 ADDRESS=1 install
The ADDRESS=1 part can be ommitted. The base node should also
turn on the green LED when it boots up.
TAKING A PICTURE
================
First, you should start an SOS Server:
$ cd sos-1.x/tools/sos_server/bin
$ make clean
$ make x86
$ ./sossrv -b 115200 -s /dev/ttyS0
Where ttyS[x] is on of the COM[x+1] port assigned to your iMote2
programmer/serial board. This can be found through the Windows
device manager. If you're using Linux, this should be ttyUSB[x],
instead.
Now you should open another terminal window and type:
$ cd tools
$ ./get_image.py 0x2 imagename.png
Where '0x2' is the address of the node that is running the
camerademo program. This address can be in hex or decimal. Also,
if the second argument is 'show' (without quotes), the image is
displayed in the default viewer (which, under Linux, is xv). Note
that you need Python2.4 with Python Imaging Library (PIL) version
1.1.6 or above for 'get_image.py' to execute. The picture will be
saved in the tools directory.
When you execute the 'get_image.py' command, the camera node
should toggle the green LED once (indicating that it received the
get_image command) and then toggle the blue LED each time it
sends an image part. The red LED should only turn on if an error
occurs.
On the base side, the blue LED toggles every time a message is
received through the UART, while the green LED toggles for every
incoming radio message.
Since we transmit the image in raw uncompressed format it takes
1200 64B-messages to transmit a 320x240 color image. If you'd
like to receive images at a faster speed (usually useful when
focusing the camera lens) you may plug the camera-node directly
on the iMote2 programmer/serial board. Moreover, you could
downsample the image or compress it for even faster transfers.
A GOOD STARTING POINT
=====================
A good starting point is to look at the camera module, found at
argus-1.0/modules/camera/camera.c. The code is well-commented and
should be easy to follow. The code for the PXA quick-capture
interface can be found at camera/cif.*, while all code concerning
the OmniVision camera is at ov/ov.*.
| Attachment | Size |
|---|---|
| enalab_camera_demo-1.0.tar.gz | 605.48 KB |
| enacamera-revb-schematic.pdf | 22.34 KB |