-- tools/dump_peripherals.lua
local f = fs.open("peripherals.txt","w")
for _,n in ipairs(peripheral.getNames()) do
local ok, t = pcall(peripheral.getType, n)
if ok then f.writeLine(n .. " " .. tostring(t)) else f.writeLine(n .. " ") end
end
f.close()
print("wrote peripherals.txt")