суббота, 28 июля 2012 г.

Driving a car

it works!
Transmission the data to the chip FT232RL (in Linux you don't have to install the driver) takes place through the COM port per protocol MODBUS.
For this purpose we use the library libmodbus.
(libmodbus is a free software library to send / receive data according to the Modbus protocol. This library is written in C and supports RTU (serial) and TCP (Ethernet) communications. For more information look its documentation.)
We tested the 16th feature - write data into a sequence of registers.
Our message consisted of 4 registers:
1st
register - the movement of engines (on / off, direction), the other three registers - the power of the engines.