website header logo

Updating the Firmware

Loading the firmware into a ptFlex flight controller requires a dedicated ISP serial programmer, designed for the ATmega line of microcontrollers.  It is possible to use an Arduino device, programmed with the ArduinoISP to serve as the ISP programmer.


The latest firmware can always be found on Custom Digital Services GitHub site.  Begin by downloading the firmware - you can clone the repository using Git, or you can just download the ptFlex folder to your local PC.

Setting up the Programmer

An independent ATmega programmer cable is required for programming the ptFlex flight controller.  The simplest solution is to purchase a dedicated programmer such as the USBtinyISP from adafruit, however you can also re-purpose a spare Arduino board to server as an "Arduino as ISP".

If you use an Arduino with the Arduino as ISP, you will need to build a cable between the Arduino and the 6-pin ISP header on the ptFlex board.  Other solutions such as the USBtinyISP readily integrate with the Arduino IDE and have the 6-pin header already installed.

A third solution is to use the Microchip (Atmel) AVRISP mkII programmer, which is Microchip's defacto programming device.  There is one catch to this solution in that the AVRISP mkII doesn't directly integrate with the Arduino IDE so you must either find and install the avrispmkii_libusb-win32 driver which can be downloaded from Mighty Ohm Blog or you can use the native USB driver, and grab the .hex file from Arduino IDE's temporary file location (%temp%) and manually install it using the Atmel Studio software.


The remainder of these instructions assume that you're using a programmer that is compatible with the Arduino IDE, and that you select the appropriate programming device from the Tools-Programmer menu. 

Preparing the IDE

In the Arduino IDE and go to File-Preferences.  In the Additional Boards Manager URLs field, add the URL to the Project: Traveler website .json file:

Edit the Arduino Boards Manager URL


Click OK to close the preferences dialog.  Then go to Tools-Boards-Boards Manager.

When the Boards Manager opens, select "Contributed" from the Type drop-down.  In the resulting list, you should find the Project Traveler Boards by Project Traveler option.  Click the Install button in the lower-right corner.


Arduino boards manager


Close out of the Boards Manager dialog, and the back under Tools-Board, you should see "ptFlex Tracker" near the bottom of the list. 

Loading the Firmware

To program the pFlex, open the firmware downloaded earlier from GitHub in the Arduino IDE. 

Go to the Tools-Board menu, select the ptFlex Tracker from the list of targets.  

Under the Tools menu, select the appropriate programmer from the list of Programmers.  See the section above "Setting up the Programmer".

Go to Sketch-Upload Using Programmer. The Sketch will compile and will program to the ATmega328 processor similarly to how a normal Arduino with the bootloader is programmed. However, in this situation, no bootloader is required on the ptFlex flight controller.  Note that you must apply external power to the ptFlex flight controller prior to programming the device, as the programmers do not provide that through the ISP cable.