diff --git a/src/main.rs b/src/main.rs index a937a7dc689965763a669bb2ac70ea7930407486..aac1c426a3273f442923620b7e0936ad493b7c40 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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); }, + } }