Using the manual below, write a simple python script to send the commend to the camera to start recording over serial (serial port = '/dev/ttyUSB0' and confirm that it was received and processed. Don't worry about error handling
High-Speed Camera Serial Communication Manual
1. General Information
Baud Rate: 19200 bps
Data bits: 8
Parity: None
Stop bits: 1
Flow Control: None
Encoding: Raw bytes
End of Transmission: No termination character (binary protocol)
2. Command List
|
Command Name |
Hex Sequence |
Description |
|---|---|---|
| Trigger Capture | 0xA5 0x5A 0x01 |
Capture a single frame immediately. |
| Start Recording | 0xA5 0x5A 0x02 |
Start continuous video recording. |
| Stop Recording | 0xA5 0x5A 0x03 |
Stop continuous video recording. |
| Get Status | 0xA5 0x5A 0x04 |
Request camera operational status. |
| Reset Camera | 0xA5 0x5A 0xFF |
Reset the camera to default state. |
3. Expected Responses
| Response Code | Meaning |
|---|---|
0x00 |
OK (Command received and successful) |
0x01 |
Error (Invalid command) |
0x02 |
Busy (Camera cannot accept command now) |
All responses are a single byte.