There is progress. As explained in the last blog post, the Brick Buddy did start. Since then, I manged to compile the PIC32 firmware and achieve some success. After a few days of working on the PIC32 firmware and learning it again. (Almost forgot how to code in C). I discovered that the PIC32 was just too fast for the RN4040 BT Module. This had always been unreliable since I started working on the BT portion. Some times it would work and sometimes it would not. In the PIC18 based Brick Buddy I, this was not a problem. A small delay and it worked flawlessly. Also there was limited code space/free RAM in the PIC18 design and examining the BT Module response would have consumed valuable memory.
I restructured the code to wait for the RN4020 response. I am not examining the response in all cases yet, but that is the plan. There needs to be a path in the initialization state machine for the every response to be verified before proceeding to the next. If it continues to fail, then a message needs to be sent out the USB port for the user.
In the process of doing this, I also slightly restructured the USB initialization. I am undecided if I am keeping this. Right now the BT Module is completely initialized before the USB module. There might be some advantage the other way around for messaging to the user. Right now I use a serial console port for this. It wont be exposed in the final product.
I was able to connect via Android to the Brick Buddy, though the new controls are not implemented yet. That is the next thing that needs to happen. I also need to come up with a user interface for 10 LEDs.
I had my second COVID shot yesterday and as the day wore on, I could tell I was beginning to feel the effects. I will close this entry out now and continue the update tomorrow.
No comments:
Post a Comment