Suits automation systems and Arduino-style controllers that can send defined start and stop text over a COM port.
| Control | Guidance |
|---|---|
| Port | Select the COM port created by the USB serial device, Arduino or serial interface. Recheck this after moving the device to another USB socket. |
| Baud | Set the same speed at both ends. The example below uses 9600 baud. |
| Start command | The exact text that starts recording, for example REC ON. |
| Stop command | The exact text that requests recording to stop, for example REC OFF. |
| Run-on | BroadcastLogger continues recording for this period after the stop command before closing the file. |
Basic Arduino example
This sketch uses a button connected between digital pin 2 and GND. Pressing the button sends REC ON; releasing it sends REC OFF. Set BroadcastLogger to the same COM port, 9600 baud and matching command text.
const int triggerPin = 2;
bool lastActive = false;
void setup() {
pinMode(triggerPin, INPUT_PULLUP);
Serial.begin(9600);
}
void loop() {
bool active = (digitalRead(triggerPin) == LOW);
if (active != lastActive) {
Serial.println(active ? "REC ON" : "REC OFF");
lastActive = active;
delay(25); // simple switch debounce
}
}
Serial.println() adds a line ending. Keep the command spelling, spaces and letter case consistent with the fields in BroadcastLogger.