mirror of
https://github.com/aprochazka/ProfilometerProbe.git
synced 2025-06-30 17:47:20 +02:00
Increase resolution, decrease send interval
This commit is contained in:
@ -133,7 +133,35 @@ void Cam_Init(I2C_HandleTypeDef *hi2c, SPI_HandleTypeDef *hspi)
|
||||
Cam_I2C_write(hi2c, (uint16_t)0x3801, 0xb0); // TIMING HORIZONTAL START - ALSO FOR MIRROR
|
||||
Cam_I2C_write(hi2c, (uint16_t)0x4407, 0x04); // COMPRESSION CONTROL
|
||||
|
||||
Cam_I2C_write_bulk(hi2c, ov5642_320x240);
|
||||
//Cam_I2C_write_bulk(hi2c, ov5642_320x240);
|
||||
//Cam_I2C_write_bulk(hi2c, ov5642_640x480);
|
||||
|
||||
Cam_I2C_write_bulk(hi2c, ov5642_1280x960);
|
||||
|
||||
// Setup camera, H-sync: High, V-sync:high, Sensor_delay: no Delay, FIFO_mode:FIFO enabled, power_mode:Low_power
|
||||
Cam_SPI_write(hspi, 0x03, 0x02);
|
||||
Cam_SPI_write(hspi, 0x01, 0x00); // Capture Control Register - Set to capture n+1 frames
|
||||
|
||||
HAL_Delay(5);
|
||||
}
|
||||
|
||||
void Cam_Refresh(I2C_HandleTypeDef *hi2c, SPI_HandleTypeDef *hspi){
|
||||
Cam_I2C_write(hi2c, (uint16_t)0x3008, 0x80);
|
||||
|
||||
Cam_I2C_write_bulk(hi2c, OV5642_QVGA_Preview);
|
||||
|
||||
Cam_I2C_write_bulk(hi2c, OV5642_JPEG_Capture_QSXGA);
|
||||
|
||||
//Cam_I2C_write_bulk(hi2c, OV5642_720P_Video_setting);
|
||||
|
||||
Cam_I2C_write(hi2c, (uint16_t)0x3818, 0xa8); // TIMING CONTROL - ENABLE COMPRESSION, THUMBNAIL MODE DISABLE, VERTICAL FLIP, MIRROR
|
||||
Cam_I2C_write(hi2c, (uint16_t)0x3621, 0x10); // REGISTER FOR CORRECT MIRROR FUNCTION
|
||||
Cam_I2C_write(hi2c, (uint16_t)0x3801, 0xb0); // TIMING HORIZONTAL START - ALSO FOR MIRROR
|
||||
Cam_I2C_write(hi2c, (uint16_t)0x4407, 0x04); // COMPRESSION CONTROL
|
||||
|
||||
//Cam_I2C_write_bulk(hi2c, ov5642_320x240);
|
||||
//ov5642_1024x768
|
||||
Cam_I2C_write_bulk(hi2c, ov5642_1024x768);
|
||||
|
||||
// Setup camera, H-sync: High, V-sync:high, Sensor_delay: no Delay, FIFO_mode:FIFO enabled, power_mode:Low_power
|
||||
Cam_SPI_write(hspi, 0x03, 0x02);
|
||||
|
@ -18,6 +18,8 @@ int Cam_I2C_write(I2C_HandleTypeDef *hi2c, uint16_t address, uint8_t data);
|
||||
int Cam_I2C_write_struct(I2C_HandleTypeDef *hi2c, sensor_reg reg);
|
||||
void Cam_I2C_write_bulk(I2C_HandleTypeDef *hi2c, const struct sensor_reg regList[]);
|
||||
void Cam_Init(I2C_HandleTypeDef *hi2c, SPI_HandleTypeDef *hspi);
|
||||
void Cam_Refresh(I2C_HandleTypeDef *hi2c, SPI_HandleTypeDef *hspi);
|
||||
|
||||
int Cam_FIFO_length(SPI_HandleTypeDef *hspi);
|
||||
void Cam_Capture(SPI_HandleTypeDef *hspi);
|
||||
|
||||
|
Reference in New Issue
Block a user