Skip to content
Snippets Groups Projects
Commit d7669ee3 authored by Robert Hedman's avatar Robert Hedman
Browse files

updated serial send with error case

parent c538984d
Branches
No related tags found
No related merge requests found
...@@ -164,7 +164,10 @@ fn main() { ...@@ -164,7 +164,10 @@ fn main() {
// PID controller // PID controller
// send voltage to motors. // 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); },
}
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment