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
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 | ||
) |
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:
-
address of 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:
-
dataBuf data buffer address to store the received data size data size to read address the 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:
-
size picture size (available sizes are SIZE160x120, SIZE320x240, SIZE640x480) doReset flag 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:
-
filename filename 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.
Generated on Mon Jul 18 2022 19:13:10 by 1.7.2