ATmega Engine Controller ======================== The code from firmware/ is supposed to run on a ATmega48 sending servo signals to cheap brushless controllers as used in RC models. The ATmega48 gets its instructions via a serial line from a host system. The code in client/ is a small test binary for the host system. Connection ---------------- [Engine 1]--->[BLC 1]--->PB1 [Engine 2]--->[BLC 2]--->PB2 [Engine 3]--->[BLC 3]--->PB3 [Engine 4]--->[BLC 4]--->PD3 [Engine 5]--->[BLC 5]--->PD5 [Engine 6]--->[BLC 6]--->PD6 [Host TX]--->PD0 [Host RX]--->PD1 Serial Protocol --------------- Each of the following commands will be acknowledged with ```0x2E```, which is the ASCII value for a dot. Available commands are: - **no operation** This command simply does nothing. It consists of a single byte: ```0x00``` - **enable** Sending the bytes ```0xCA```, ```0xFE```, ```0xBA```, ```0xBE``` activates the engine controlling. Before sending this command the controller does not activate any engine. - **disable** One can disable all engines again by sending the bytes ```0xDE```, ```0xAD```, ```0xBA```, ```0xBE```. After disabling the engines with this command all future engine settings will be ignored. - **set speed (of a single engine)** To set the speed of a single engine on has to send two bytes: first the engine number in the system (```0x01``` - ```0x06```), the the desired speed (```0x00```-```0xFF```). - **set speed of all engines simultaneously** One can also set the speed of all engines simultaneously to the same value by first sending ```0xFF``` and then sending a second byte with the desired speed (```0x00```-```0xFF```).