BeanShell script to control shutters (via Arduino)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

BeanShell script to control shutters (via Arduino)

Luke Ferro
Hi,

We are using an Arduino to control shutters via a BeanShell script in
Micromanager. Right now, I can get it to work with two shutters using the
code below. I do have to run it with only two shutters on. If there are
other shutters on, they all quickly turn on and off each cycle for some
reason.

import mmcorej.StrVector;
x = new StrVector();
x.add("16");
x.add("32");
mmc.loadPropertySequence("Arduino-Switch", "State", x);
mmc.startPropertySequence("Arduino-Switch", "State");

However, if I try to do three shutters using the code below, it does not
work. What happens is that one combination of two shutters will open
together, then another combination of two shutters, and so on. I am not
familiar with BeanShell or Java so I assume there is just something off with
the code. Any ideas?

import mmcorej.StrVector;
x = new StrVector();
x.add("8");  
x.add("16");
x.add("32");
mmc.loadPropertySequence("Arduino-Switch", "State", x);
mmc.startPropertySequence("Arduino-Switch", "State");

Thanks,
Luke

--
Luke Ferro

Ph.D. Candidate | Yildiz Lab
Department of Molecular and Cellular Biology
University of California, Berkeley




--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general