Commit 85ffd44b authored by Jake Read's avatar Jake Read
Browse files

add robot notes

parent 272032cf
......@@ -6,13 +6,32 @@ const Programs = require('./programs.js')
// the program object: real simple, just has a description, and a 'modules'
var program = Programs.new('new program')
/* ok
- robot reads robot joints
- robot takes joint angle samples into array like
[[t1, t2],[t1, t2],...,[t1,t2]]
- robot sends this array to python scripto
- python scripto does l1, l2 guesses
- robot does forward transform with live [t1, t2]
- robot displays forward transform with [t1, t2]
- modules needed
- object collector (i.e. collects inputs into a list, has 'output' and 'reset' input triggers / buttons as well)
- two-up contencator (i.e. takes two inputs, puts them into arrays)
- gate opens, lets a count thru, shuts
*/
var link = Programs.loadModuleFromSource(program, './modules/hardware/atkseriallink.js')
link.startUp()
link.state.log = false
Programs.setUI(link, 1050, 50)
var mrbot = Programs.loadModuleFromSource(program, './modules/hardware/atkmrobot.js')
Programs.setUI(mrbot, 600, 50)
var mrbotone = Programs.loadModuleFromSource(program, './modules/hardware/atkmrobot.js')
Programs.setUI(mrbotone, 600, 50)
var mrbottwo = Programs.loadModuleFromSource(program, './modules/hardware/atkmrobot.js')
Programs.setUI(mrbottwo, 600, 450)
var button = Programs.loadModuleFromSource(program, './modules/ui/button.js')
var delay = Programs.loadModuleFromSource(program, './modules/util/delay.js')
......@@ -23,18 +42,18 @@ Programs.setUI(button, 90, 50)
Programs.setUI(delay, 90, 250)
Programs.setUI(gate, 90, 400)
button.outputs.whammy.attach(mrbot.inputs.get_pos)
button.outputs.whammy.attach(mrbotone.inputs.get_pos)
button.outputs.whammy.attach(delay.inputs.thru)
delay.outputs.out.attach(gate.inputs.thru)
gate.outputs.out.attach(button.inputs.thru)
var log = Programs.loadModuleFromSource(program, './modules/util/log.js')
log.state.prefix = "jnt1:"
Programs.setUI(log, 840, 520)
mrbot.outputs.pos.attach(log.inputs.thru)
Programs.setUI(log, 1050, 520)
mrbotone.outputs.pos.attach(log.inputs.thru)
var canvas = Programs.loadModuleFromSource(program, './modules/ui/threeCanvas.js')
Programs.setUI(canvas, 600, 650)
Programs.setUI(canvas, 1500, 650)
/*
var stest = Programs.loadModuleFromSource(program, './modules/ui/stest.js')
......
Markdown is supported
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