Skip to content

Uses the Data output from a Favero scoring machine to create an overlay in OBS

License

Notifications You must be signed in to change notification settings

BenKohn2004/Favero_Overlay

Repository files navigation

Favero_Overlay

The Favero Full Arm scoring machines use serial data output that can be interpreted through an Arduino and then relayed to Open Broadcast Software (OBS), here is an example on Youtube, where the data is overlayed onto a live stream of the fencing.

This uses three Arduinos, two Wemos D1 minis and an Arduino Pro Mini. The hardware is assembled as shown in the schematic

Libraries

The Libraries used for the Arduino are FastLED, ESPNOW, Wire.h, ESP8266WiFi. The libraries ESPNOW and Wire.h are included by default with the Arduino IDE.

Parsing and Transmitting the Favero Data

The MAC addresses for the Wemos can be found by loading and running Wemos_ESPNOW_MacAddress.

The first Wemos is connected to the output port of the Favero machine and runs Wemos_Favero_Serial_Parser_Rev_1 which retrieves and parses the data from the Favero. The Wemos then transmits the data via wifi to the Wemos running Wemos_Favero_ESPNOW_Receiver.

Receiving the Favero Data

The Wemos running Wemos_Favero_ESPNOW_Receiver, is connected by I2C to the Arduino Pro Mini which is running Micro_Pro_Favero_HID.

Displaying the Favero Data

The Pro Mini acts as a human input device, i.e. a Keyboard, and presses keys that correlate to the data received from the Favero. The keys are associated with Hotkeys in OBS and toggle the visibility of the displays such as the Red/Green/White Lights as well as the grounding light and priority. The Keys chosen are similar to F13 through F24 with CTRL or ALT pressed. The Micro_Pro_Favero_HID_Key_Input can be used to aid in inputting these keys as Hotkeys in OBS.

The Pro Mini also transmits serial data relating to the Time and Score. This is displayed using Putty. Putty is then displayed in OBS through a Window Capture Source using a Chroma Key filter.

In Putty, find the port that is listening to the Pro Mini and adjust the ‘Default Background’ color to Green (0,255,0). In OBS add a filter to the Putty Window Capture, by default the Green will be filtered out. Adjust text size as desired and then create duplicates in OBS and crop to fit in desired boxes. Alternatively, you can run the putty-sessions.reg to create a Favero Input session in Putty that will work.

The nameplastes are created using the Lower Third plugin.

Adjusting OBS

Import Favero_Overlay.json and link the image files for the lights. Change the Fencing_Camera source to your camera. Check that the Putty Sources are referencing the window displaying Putty. I have found that it helps if Putty is fullscreen in the background. The OBS window should also be active for the hotkeys to be detected by OBS. Putty will appear blank until new data is received from the Favero Scorebox.

The hotkeys are assigned in the OBS Settings using HID Key Input Tool. The arduino program is loaded onto a Micro Pro and then the Micro Pro sends a new keystroke each second to the computer through a connected USB cord, which can be captured in the OBS Settings Hotkeys. This process can be a bit tedious and frustrating to get correct. Here is an example of how the hotkeys will look when assigned in OBS and shows the correlation between the hotkeys and the data sent from the Favero. The OBS screen has to be active for the hotkeys to toggle the visibility of the lights.

Using the Time Delay

Using a camera that has a lag such as a Real Time Streaming Protocol (RTSP) can be mitigated by adding in a delay to the data received by the Micro Pro Mini HID. This is done with the button and potentiometer. When the button is depressed, the Micro Pro Mini will read the potentiometer (a value from 0 to 1024) and delay the receipt of the received data by the potentiometer value in milliseconds. The Red LED will also light indicating when the delay is active and when it is not. The value of the delay is shown as the last value displayed on the Putty window.

I found this useful when using iVcam, where a delay of 350 milliseconds allowed the data and video to nearly sync up. The potentiometer makes it possible to quickly adjust the delay without reloading data and the push button allows to easily change between cameras with little lag, such as webcams, and cameras with more lag.

Use of the Time Delay isn't necessary and the program will work as if there is no delay if the associated hardware (Button, Potentiometer and LED) is not hooked up to the Micro Pro Mini. I have found that when used with a USB webcam, a delay is not needed to sync up the video and the lights.

About

Uses the Data output from a Favero scoring machine to create an overlay in OBS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages