Skip to content

Instantly share code, notes, and snippets.

# SPDX-FileCopyrightText: 2021 Tim C, written for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
Make green and purple rectangles and a
"Hello World" label. Displayed with Blinka_Displayio_PyGameDisplay
"""
import displayio
import terminalio
from adafruit_display_text import label
# SPDX-FileCopyrightText: 2020 Tim C, written for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense
"""
Adapted from this answer: https://stackoverflow.com/a/27756701/507810
"""
import displayio
import terminalio
from adafruit_display_text import label
from blinka_displayio_pygamedisplay import PyGameDisplay
"""
Gauge
Turning the arc function into a guage that starts at angle 315 degrees
and sweeps 270 degrees
"""
import math
import displayio
"""
Gauge
Turning the arc function into a guage that starts at angle 315 degrees
and sweeps 270 degrees
"""
import math
import displayio
import time
import adafruit_bmp280
import board
import displayio
import ulab
# Blank the screen. Scrolling text causes unwanted delays.
d = displayio.Group()
board.DISPLAY.show(d)
"product_name": "{{cookiecutter.sensor_name}}{% if cookiecutter.sensor_description %} {% endif %}{{cookiecutter.sensor_description}}",
@FoamyGuy
FoamyGuy / brightness_test.py
Created May 28, 2021 01:53
test for brightness up/down control codes
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
from adafruit_hid.consumer_control import ConsumerControl
import time
# HID setup
kbd = Keyboard(usb_hid.devices)
cc = ConsumerControl(usb_hid.devices)
@FoamyGuy
FoamyGuy / libraries
Last active May 10, 2021 12:48
libraries updates
[x] https://learn.adafruit.com/adafruit-sensirion-shtc3-temperature-humidity-sensor/python-circuitpython
[x] https://learn.adafruit.com/adafruit-bme280-humidity-barometric-pressure-temperature-sensor-breakout/python-circuitpython-test
[x] https://learn.adafruit.com/adafruit-pct2075-temperature-sensor/python-circuitpython
[x] https://learn.adafruit.com/adafruit-aht20/python-circuitpython
[x] https://learn.adafruit.com/adxl343-breakout-learning-guide/circuitpython
[x] https://learn.adafruit.com/adxl345-digital-accelerometer/python-and-circuitpython
[x] https://learn.adafruit.com/adafruit-am2320-temperature-humidity-i2c-sensor/python-circuitpython
[x] https://learn.adafruit.com/data-logging-with-feather-and-circuitpython/circuitpython-code
[x] https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/master/Data_Logging_with_Feather_and_CircuitPython/DataLogger.py
[x] https://learn.adafruit.com/adafruit-as7262-6-channel-visible-light-sensor/circuitpython-wiring-test
import time
import json
import array
import math
import gc
import board
import busio
import audiocore
import displayio
import digitalio

Multiple screens is not a string requirement, but it will make things MUCH easier. You can manage the stream and (try to) keep anything private on the screen that is not shared as a source in OBS.

I use OBS and hooked it up with restream.io. I don't recall the exact process but it was fairly straightforward after signing up for restream.io. Youtube seems to keep them recorded automatically, I don't think I had to do anything extra.

Restream.io can in turn connect your twitch, youtube and other platform accounts. All of them will go live together (if everything works)

OBS "Scenes" allow you to build up other things on your view like the chat box, other camera feeds, and any static elements you want. You can setup multiple scenes and switch between them if you want.

I used the discord stream kit chat overlay from here: https://streamkit.discord.com/overlay there are a few configurable options. But not overall size. I ended up writing a little javascript bookmarklet to manipulate the size: