Custom pcb using the nRF's built in micro, ADC, PWM
The PCB is still weeks from being done, but wanted to prototype a working system using parts I already have: arduino pro micro, nrf2401, OLED display.
I wanted to make sure the .96inch OLED display from Banggood worked. You can drive this display using SPI or I2C. It comes setup for SPI. Changing to I2C requires moving a few soldered resistors on the back. I like I2C because it uses fewer wires and I'm already using the SPI pins to communicate with the NRF2401 radio. I moved the SMD resistor from R3 to R1 and added a jumper wire on R8.
I used the Adafuit SSD306 librarys (Adafruit_GFX.h and Adafruit_SSD1306.h) to drive the display with only one change: The I2C address of the diplay = 0x3C (when setting DC/CS pins to GND)
Various NRF libraries have been around for a while. It's very important to delete and re-install the latest ones. I'm stilling the Aduino IDE. Enabling verbose output on compile shows that even after re-installing the new NRF library, the IDE is still using the object file (.o) from the previous build. You have to delete that (easiest to rm -rf <path> from the terminal) in order for the IDE to re-compile the new NRF library. Doing this saved me countless hours of frustration as I've had inconsistent results (NRF somes not respoding in various sketches) in the past that I'm pretty sure were related to inconsistent NRF libraries. The link above seems to work.
This is the full-up prototype running on a battery with USB battery charge circuit. The NRF52832 should elimiate all but 9 of these wires: 2 Battery, 3 for the Throttle, and 4 for the I2C display.
It is doing a full round trip communication sending the trottle value and getting back an acknolege message and battey info.
Almost done with the PCB v1 (see pic) that combines the SparkFun NRF breakout with a battery charger circuit. I made no changes to the NRF breakout other than move the ISP programming pins to make room for the VCC connection coming from the bottom end. The final version will considerably smaller since it will eliminate most of the unused breakout IO pins..only keeping those needed for the display, throttle, on/off.
The NRF 52832 is Near-Field capable, so I may add a NF antenna and use it for pairing.