Skip to content

Instantly share code, notes, and snippets.

duppypro / DynamicTrainMap.lua
Last active August 23, 2021 20:26
Updated Dynamic Train Map for Satisfactory Game FicsIt-Networks Mod.
View DynamicTrainMap.lua
local gpu = computer.getPCIDevices(findClass("GPU_T1_C"))[1]
local screen = component.proxy(component.findComponent(findClass("Build_Screen_C")))[1]
if not screen then
screen = computer.getPCIDevices(findClass("ScreenDriver_C"))[1]
local station = component.proxy(component.findComponent(findClass("Build_TrainStation_C")))[1]
local trains = station:getTrackGraph():getTrains()
print("Found", #trains, "trains.")
duppypro / Sample_MMA8452Q_Device.nut
Last active December 26, 2015 22:49
Sample Electric Imp code for reading i2c registers of MMA8452Q accelerometer See See for MMA8452Q accelerometer breakout board
View Sample_MMA8452Q_Device.nut
// Sample code using MMA8452Q accelerometer
// Electric Imp Device Squirrel code
// License:
// This code is provided under the Creative Commons Attribution-ShareAlike 3.0 License
// If you find bugs report to duppypro on github or @duppy #MMA8452Q on twitter
// If you find this useful, send a good word to @duppy #MMA8452Q
// Thanks to @jayrz for finding the first bug.