Skip to content
drme edited this page Dec 28, 2013 · 1 revision

The control board main part is a cc2541 module by Texas Instruments. This module provides 8051 CPU and Bluetooth radio in one package. The firmware has to be developed using IAR tool that is available as trial version, which is capable of building small firmware images or works for a limited time. Also TI BLE-stack is needed.

The main part of firmware is its Bluetooth Smart GATT table that defines device services and characteristics. So this firmware has one service for controlling a car and this service has several characteristics/attributes:

  • Steering attribute – the value from 0 to 500, there 375 is centre, 0 is a left turn and 500 is a right turn (and values in the between could be used for precise control).
  • Throttle attribute – the value from 0 to 500, there 375 is keeps motor off, 0 lets it run backward at full speed and 500 lets it run forward at its full speed (the intermediate values could be used for controlling motor speed, make it run a little bit slower or faster).
  • Battery voltage attribute – allows monitoring cars battery voltage and to determine if the battery is not running low.
  • Lights attribute – depending on written values, the Bluetooth module turns on/off the specified lights.

Then the service and its attributes are defined, it’s only left to finish firmware – add code for reacting to attribute changes and adjust motors, steering or lights.

<< Debugger connected>>

Then the firmware is ready it’s time to upload it to the Bluetooth module. The easiest way is to load Over the Air firmware in it, which would allow later updating Bluetooth module firmware directly from a smartphone.

For loading over the air firmware:

  • The project has to be built as Simple-Car-OAD-ImageA target
  • The BIM project from BLE SDK has to be built as well.
  • Connect the Bluetooth module to the CC Debugger.
  • Launch Flash Programmer.
  • Flash BIM image with Erase, Flash, Verify option.
  • Flash Car image with Append, Flash, Verify option.
  • If flash was successful, it’s time to assemble the board and proceed to the iOS Application.

flashing

building

Clone this wiki locally