summaryrefslogtreecommitdiff
path: root/echest.lua
blob: 6a769ffc8d46e73d62d7450664b544125d904f88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
local p = assert((peripheral.find"ender_storage"))

-- local function clamp(x, min, max)
-- 	if x < min then return min
-- 	else if x > max then return max
-- 	else return x
-- 	end
-- end

-- local function setnums()
-- 	local fp = fs.open("/efreq.dat")



-- local function getnums()
-- 	local fp = fs.open("/efreq.dat")
-- 	if not fp then
-- 		setnums(0,0,0)
-- 		return 0,0,0
-- 	else
-- 		local s = fp.readAll()
-- 		fp.close()
-- 		return unpack(strutil.splitw(s))
-- 	end
-- end

for x=0,15 do for y=0,15 do for z=0,15 do
	term.clearLine()
	local _,line = term.getCursorPos()
	term.setCursorPos(1,line)
	io.write(("%d %d %d "):format(x,y,z))
	p.setFrequency(2^x, 2^y, 2^z)
	local name = p.getName()
	if name ~= nil then
		print(name)
	end
	os.sleep(0.1)
end end end