Commit d7669ee3 authored by Robert Hedman's avatar Robert Hedman

updated serial send with error case

parent c538984d
......@@ -164,7 +164,10 @@ fn main() {
// PID controller
// send voltage to motors.
port.write(&message[0..message_length]).unwrap();
match port.write(&message[0..message_length]) {
Ok(n) => {println!("Controller: sent {} bytes to arduino!", n);},
Err(e) => {println!("Controller: could not write to arduino: {}", e); },
}
}
......
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