Skip to content

Instantly share code, notes, and snippets.

local sides = require("sides")
local event = require("event")
local component = require("component")
local serialization = require("serialization")
local max_lights_on_min = 4 -- >= 1
local max_lights_on_max = 6 -- <= 16
local switchboards = {}
local light_board = component.list("light_board")()
@Forecaster
Forecaster / relay.lua
Created May 7, 2020 19:53
broadcast-to-linked-card-relay for microcontroller
--Uses line-separated key=value pairs for configuration in the eeprom data section
--Available settings: `inputOnly`:boolean, `outputOnly`:boolean, ports:comma-separated-list
local function splitter(str, sep)
if sep == nil then sep = "%s" end
local t={}
for string in string.gmatch(str, "([^"..sep.."]+)") do table.insert(t, string) end
return t
end
local tunnel = component.list("tunnel")()

Keybase proof

I hereby claim:

  • I am Forecaster on github.
  • I am forecaster (https://keybase.io/forecaster) on keybase.
  • I have a public key whose fingerprint is AFAB 3FEA 00AB 8CB9 F84F D71E FE47 3676 BCBD 7DE2

To claim this, I am signing this object:

@Forecaster
Forecaster / relay_sub.pl
Last active December 30, 2016 15:19
Discord relay bot message parsing (turns BotName: <discord_user> message into discord_user: message)
use strict;
use vars qw($VERSION %IRSSI);
use Irssi;
$VERSION = '1.02';
%IRSSI = (
authors => 'Forecaster',
contact => 'forecaster71@gmail.com',
name => 'Relay Substitution Script',
description => 'This script allows ' .