Commit 36b9204d authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Add julia example

parent ba77f396
import MobergIO
using MobergIO: read, write
function scan()
result = [[], [], [], [], []]
m = MobergIO.Moberg()
for (i, f) = enumerate([MobergIO.AnalogIn, MobergIO.AnalogOut,
MobergIO.DigitalIn, MobergIO.DigitalOut,
MobergIO.EncoderIn])
for j in range(0, stop=100)
try
push!(result[i], ((j, f(m, Unsigned(j)))))
catch ex
end
end
end
result
end
function main()
channels = scan()
for c = channels
println(length(c))
end
for c = channels[2]
println("$(c[1]) $(write(c[2], Inf)), $(write(c[2], -Inf)), $(write(c[2], 0.0))")
end
end
main()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment