NGALAC/Subsystems
Jump to navigation
Jump to search
Power
Streaming PC
BIOS setting for Auto-on with power-on (e.g. from switch)
Audio
Gainclones are a DIY version of a $3000 audio system called the GainCard.
NGALAC possesses a LM3886TF based dual supply amp which requires a split rail +28/-28 DC supply
Example DIY circuits which are easy to build with clear instructions
Error creating thumbnail: Unable to save thumbnail to destination
DIY PSU price is very high, will compare to purchase options
Using computer PSU may be possible after boosting +/-12 to +/-28, however, current on -12V line may not be enough to rate maximum wattage
| Qty | Short Name | Price | Part | Link | Part Total |
|---|---|---|---|---|---|
| 1 | Transformer Dual 28V secondaries, 4.6A Max current | $28.00 | VPS56-2300 | Digikey | $28.00 |
| 16 | Diode | $1.00 | MUR860 | Digikey | $16.00 |
| 4 | Linear Voltage Regulator | $2.10 | LM338T | Digikey | $9.00 |
| 8 | Rectifier Diode | $0.20 | LM4002 | Digikey | $1.60 |
| 4 | 1200uF Radial Aluminum Electrolytic Caps | $1.00 - $6.00 (depending on current) | EEU-FS1J102B | Digikey | $24.00 |
| * | Various Caps and Resistors (1W) | $10.00 | * | * | $10.00 |
| Total | $95.00 | ||||
OBS automation
inputs -> Arduino/RaspberryPi <-> CmdMessenger <-> Serial port <-> USB <-> streaming CPU <-> PyCmdMessenger <-> obs-wc-controller <-> obs
Guardian Process - Windows OBS restart automatically on fail strategy
| OBS Web Socket Plugin | Sets up a websocket API for OBS |
| obs-wc-rc | Python library to interface with OBS websocket API |
| PyCmdMesssenger | Python library for CmdMessenger using serial port |
| CmdMessenger for Arduino | Arduino CmdMessenger library to communicate with PyCmdMessenger on server via serial port |
OBS websocket plugin
Error creating thumbnail: Unable to save thumbnail to destination
obs-wc-rc
Query and send commands to OBS from python (can theoretically control everything)
import asyncio
from obswsrc import OBSWS
from obswsrc.requests import (ResponseStatus,
StartStreamingRequest,
GetStreamingStatusRequest
)
from obswsrc.types import Stream, StreamSettings
async def main():
async with OBSWS('localhost', 4444, 'password') as obsws:
response = await obsws.require(GetStreamingStatusRequest())
print("Streaming: {}".format(response.streaming))
print("Recording: {}".format(response.recording))
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.close()
Output:
Streaming: False Recording: True
Event Listener
import asyncio
import logging
import sys
from obswsrc import OBSWS
from obswsrc.logs import logger
# We will output logging to sys.stdout, as many events might raise errors
# on creation (that's because protocol.json is not perfect) - such errors
# are logged by obs-ws-rc automatically, we just need to see them
logger.setLevel(logging.ERROR)
logger.addHandler(logging.StreamHandler(stream=sys.stdout))
async def main():
async with OBSWS('localhost', 4444, "password") as obsws:
print("Connection established.")
# We will receive events here by awaiting for them (you can await for
# an event of a specific type by providing `type_name` argument to
# the obsws.event() method)
event = await obsws.event()
# Awaited event might be None if connection is closed
while event is not None:
print("Awaited for '{}' event!".format(event.type_name))
event = await obsws.event()
print("Connection terminated.")
Output:
Awaited for 'TransitionBegin' event! Awaited for 'SwitchScenes' event! Awaited for 'RecordingStarting' event! Awaited for 'StreamStarting' event!
Arduino
- Debounce buttons
- Pressure switch for "player in front of machine"
- Note: arduino.ArduinoBoard(enable_dtr=False) See: ##Known Issues in PyCmdMessenger