Initialize
After installing the library, include the library at the top of your code:
from zaber_motion.binary import Connection
# The rest of your program goes here
using Zaber.Motion;
using Zaber.Motion.Binary;
// namespace name may differ in your code
namespace example
{
class Program
{
static void Main(string[] args)
{
// The rest of your program goes here
}
}
}
const { binary: { Connection } } = require('@zaber/motion');
async function main() {
// The rest of your program goes here
}
main();
// package name may differ in your code
package example;
import zaber.motion.binary.Connection;
import zaber.motion.binary.Device;
public class App
{
public static void main(String[] args)
{
// The rest of your program goes here
}
}
import zaber.motion.binary.Connection;
% The rest of your program goes here
javaaddpath("motion-library-jar-with-dependencies.jar");
CONNECTION_CLASS = "zaber.motion.binary.Connection";
% The rest of your program goes here
#include <zaber/motion/binary.h>
using namespace zaber::motion;
using namespace zaber::motion::binary;
int main() {
/* The rest of your program goes here */
return 0;
}
Ensure that the file motion-library-jar-with-dependencies.jar
is in the current directory. You can alternatively provide an absolute path.
Continue the Getting Started guide by opening a serial port.