Crate robust_arduino_serial [] [src]

Robust Arduino Serial

robust_arduino_serial is a simple and robust serial communication protocol. It was designed to make two arduinos communicate, but can also be useful when you want a computer (e.g. a Raspberry Pi) to communicate with an Arduino.

It works with anything that implement the io::Write and io::Read traits.

Enums

Order

Functions

convert_i8_to_order

Convert an int to an Order

read_i8

Read one byte from a file/serial port and convert it to a 8 bits int

read_i16

Read two bytes from a file/serial port and convert it to a 16 bits int

read_i32

Read four bytes from a file/serial port and convert it to a 32 bits int

read_order

Read one byte from a file/serial port and convert it to an order

write_i8

Write one byte int to a file/serial port. It returns the number of bytes written

write_i16

Write two bytes int to a file/serial port. It returns the number of bytes written

write_i32

Write four bytes int to a file/serial port. It returns the number of bytes written

write_order

Write an order to a file/serial port. It returns the number of bytes written