I have made good progress in the last few days. The Brick Buddy Module is actually more responsive than before the pause. I am quite happy with the BT performance and the USB HID connection. The Android App connects crisply as does the the USB HID connection to the PC. So it all looks good now.
While looking at the changes needed for 10 LEDs and the motor performance I would like to do, it has become apparent that the BT interface is going to have to change to 64 bits. When the first Brick Buddy was developed, that was a PIC18F 8 bit processor. Forcing it to do 64 bit manipulation did not make sense. The RN4020 BT module will transfer up to 20 bytes with each characteristic read/write, so this was not the limiting factor. With a PIC32, manipulating 64 bit values, is not stressing the processor. While PIC32MX is a native 32 bit process, it does a nice job of handling the simple integer operations I will be doing.
I started modifying the Android App and the PIC32 code to use both 32 and 64 bit transmissions. I have the 64bit working, having to solve the little/big endian issues between the PIC32 and the Android implementation. Once that was solved, it became very easy to parse the command payloads. Once I settle on the new command payloads, the documentation will have to be updated.
The only issue I have come across is that once you start 64 bit transmission from the Android App, it seems to always send 64 bits, with the upper 32 bits zeroed out. This is probably some issue on how I am decoding whether the transmission is 32 or 64 bits. That will be the next thing I need to solve.
Once the 64 bit conversion is finished, the setup process will be complete and I will move on to pure development of the Brick Buddy 2.
No comments:
Post a Comment