Bluetooth JPEG camera library with test program build over the the original library for LS-Y201 LinkSprite JPEG Camera

Dependents:   JPEGCameraTest JPEGCamera_SIM808_STM32F401RE JPEGCamera_SIM808_MPU9150_STM32F401RE

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 ()
 Take a picture.
bool processPicture (Serial &control)
 Process picture (writing the file)
bool reset ()
 Perform reset oepration (it takes 4 seconds)
bool takePicture_int (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 17 of file JPEGCamera.h.


Constructor & Destructor Documentation

JPEGCamera ( PinName  tx,
PinName  rx 
)

Create JPEG Camera.

Parameters:
txtx pin
rxrx pin

Definition at line 16 of file JPEGCamera.cpp.


Member Function Documentation

int getImageSize (  )

Get the picture image size.

Returns:
the actual image size in bytes

Definition at line 100 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 37 of file JPEGCamera.cpp.

bool isReady (  )

Return whether camera is ready or not.

Returns:
true if ready, false otherwise

Definition at line 33 of file JPEGCamera.cpp.

bool processPicture ( Serial &  control )

Process picture (writing the file)

Parameters:
addressof serial port used to transmit the image
Returns:
true if no error in processing, false otherwise

Definition at line 55 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 108 of file JPEGCamera.cpp.

bool reset (  )

Perform reset oepration (it takes 4 seconds)

Returns:
true if succeeded, false otherwise

Definition at line 74 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 21 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 93 of file JPEGCamera.cpp.

bool takePicture (  )

Take a picture.

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

Definition at line 41 of file JPEGCamera.cpp.

bool takePicture_int ( void   )

Send a picture command to the camera module.

Returns:
true if succeeded, false otherwise

Definition at line 86 of file JPEGCamera.cpp.