-
Notifications
You must be signed in to change notification settings - Fork 91
DDE allows users to develop and run software on multiple platforms to control the Dexter 5 axis robot arm. It is fundamentally a JavaScript development environment with lots of extensions. See DexRun-DDE-communications for more detail about the communications between DDE and Dexter.
Units: Note that Dexter uses the metric system of measurement. So all units of distance are in meters. A meter is about 3 feet which is about Dexters full reach at the size Dexter has been made at so far. A tenth of a meter (e.g. 0.1) is about 4 inches which is about the length of your finger. A hundredth of a meter (e.g. 0.01) called a "centimeter" is a about a half inch (actually closer to 0.4 inches) or about the width of your little finger. And a thousandth of a meter (e.g. 0.001) called a "millimeter" is tiny, about a half of a tenth of an inch or about the thickness of a fingernail.
Debugging: Note that all of this is documented in the help system inside DDE. Download and install the program to access that in it's formatted form.
- the
outfunction can be wrapped around anything to dump a copy of the result to the output panel when it is evaluated without any change in program behavior. It returns whatever it prints, so there is no side effect to it being included. E.g.let variable = out("Hello" + "World").toUpper())will still put "HELLOWORLD" in variable, but it will also let you see "HelloWorld" on the screen. -
inspectprovides a very nice interactive inspector in the output panel. It does not return values likeoutas of this time. - To debug DDE code in the Chrome debugger, launch that by right clicking anywhere in the Editor pane and select Inspect Element to open the debugger UI. Then add
debugger;anywhere in the code and "Eval" it. You can explore variables, step, etc... everything you can do in a web page. - To update / debug any part of DDE, simply overwrite the objects property in the Editor script. To retain that between restarts, add the code to the dde_init.js file in the dde_apps folder. e.g. To get a report to the output panel of the result of any call to Dexter.sleep in the job, just redefine the original function:
Dexter.sleep = function(seconds){ return make_ins("z", seconds) }
as a new function including a call toout. e.g.
Dexter.sleep = function(seconds){ return out(make_ins("z", seconds)) }
any job evaluated after that line will show the instruction array generated by a Dexter.sleep in the do_list.
In general, you can override any function in a class with:
Class.function-name = function(parameters) { code }
To search the Wiki, use the main search box in the black bar at the top, then select WiKi to filter the results or go to https://github.com/HaddingtonDynamics/Dexter/search?type=Wikis&q= and then add your search terms to the end of the URL.
To report errors, or request additional data, please chat with us on discord and/or raise a new issue