removed wait with timer

Dependents:   Gaurd_Server2 Gaurd_Server

Fork of JPEGCamera by Hiroshi Yamaguchi

Embed: (wiki syntax)

« Back to documentation index

JPEGCamera Class Reference

JPEGCamera Class Reference

Interface for LinkSprite JPEG Camera module LS-Y201. More...

#include <JPEGCamera.h>

Public Member Functions

 JPEGCamera (PinName tx, PinName rx)
 Create JPEG Camera.
bool setPictureSize (JPEGCamera::PictureSize size, bool doReset=true)
 Set picture size.
bool isReady ()
 Return whether camera is ready or not.
bool isProcessing ()
 Return whether camera is processing the taken picture or not.
bool takePicture (char *filename)
 Take a picture.
bool processPicture ()
 Process picture (writing the file)
bool reset ()
 Perform reset oepration (it takes 4 seconds)
bool takePicture (void)
 Send a picture command to the camera module.
bool stopPictures (void)
 Send a stop pictures command to the camera module.
int getImageSize ()
 Get the picture image size.
int readData (char *dataBuf, int size, int address)
 Read the picture data to the buffer.

Detailed Description

Interface for LinkSprite JPEG Camera module LS-Y201.

Definition at line 16 of file JPEGCamera.h.


Constructor & Destructor Documentation

JPEGCamera ( PinName  tx,
PinName  rx 
)

Create JPEG Camera.

Parameters:
txtx pin
rxrx pin

Definition at line 15 of file JPEGCamera.cpp.


Member Function Documentation

int getImageSize (  )

Get the picture image size.

Returns:
the actual image size in bytes

Definition at line 110 of file JPEGCamera.cpp.

bool isProcessing (  )

Return whether camera is processing the taken picture or not.

Returns:
true if the camera is in processing, false otherwise

Definition at line 36 of file JPEGCamera.cpp.

bool isReady (  )

Return whether camera is ready or not.

Returns:
true if ready, false otherwise

Definition at line 32 of file JPEGCamera.cpp.

bool processPicture (  )

Process picture (writing the file)

Returns:
true if no error in processing, false otherwise

Definition at line 61 of file JPEGCamera.cpp.

int readData ( char *  dataBuf,
int  size,
int  address 
)

Read the picture data to the buffer.

Parameters:
dataBufdata buffer address to store the received data
sizedata size to read
addressthe address of the picture data to read
Returns:
the size of the data read

Definition at line 118 of file JPEGCamera.cpp.

bool reset (  )

Perform reset oepration (it takes 4 seconds)

Returns:
true if succeeded, false otherwise

Definition at line 81 of file JPEGCamera.cpp.

bool setPictureSize ( JPEGCamera::PictureSize  size,
bool  doReset = true 
)

Set picture size.

Parameters:
sizepicture size (available sizes are SIZE160x120, SIZE320x240, SIZE640x480)
doResetflag to perform reset operation after changing size
Returns:
true if succeeded, false otherwise

Definition at line 20 of file JPEGCamera.cpp.

bool stopPictures ( void   )

Send a stop pictures command to the camera module.

Returns:
true if succeeded, false otherwise

Definition at line 103 of file JPEGCamera.cpp.

bool takePicture ( char *  filename )

Take a picture.

Parameters:
filenamefilename to store the picture data
Returns:
true if succeeded, false otherwise

Definition at line 40 of file JPEGCamera.cpp.

bool takePicture ( void   )

Send a picture command to the camera module.

Returns:
true if succeeded, false otherwise

Definition at line 96 of file JPEGCamera.cpp.