EV3-DC
[WIP] Low-level EV3 direct command library. Designed to be able to use safely
Features
- Allocate global and local memory
- Packet generation from bytecodes
- Direct reply basic parser
- Utility library for Run-Length-Encoding, packets merging, bytecode builder More documentation is available in docs
Bytecode documentation
LEGO Mindstorms EV3 Firmware Developer Kit [Link]
Example
This example turn on motor on port A & B with 50% power clockwise
use ;
use ChainByte;
use Reply;
// Create new packet. Packet can contains many OpCodes
let mut cmd = new;
// Chainable vector operations
let mut byte = new;
byte.push // opOutput_Power
.add // Layer
.add // Port
.add // Power
.push // opOutput_Power
.add // Layer
.add; // Port
let mut buf = ; // Create reply buffer (SIZE SHOULD BE ATLEAST 5 + reserved_bytes)
println!; // Generate direct command packet
read;
let rep = parse; // Parse direct reply
println!;
Binary
All the example program is written for USB communication. Add hidapi to cargo
examples/image.rsDisplay 178x128 PBM image on EV3 screenexamples/info.rsShow information about PBrick (w/ code comments)