It seemed pretty straight forward to connect my PSoC4 keyboard to a micro:bit since the PSoC4 could already scan the keyboard and display the characters and the micro:bit program could already control its LCD. However I ran into no end of grief trying to make it happen. After I set up the PSoC in SPI slave mode there was just no output. careful monitoring of the micro:bit SPI discovered a couple of minor issues with the micro:bit program, but even after it was cleaned up, the PSoC just wasn't responding as expected. It is very tough to troubleshoot the slave since there were no signals to analyze. Of course I had goofed in picking an output mode for the SPI transmit pin, but it took an lot of digging in many wrong directions before I discovered it.
Then I ran into severe memory shortages with my micro:bit program. I found it very difficult to figure out how much memory is available in the micro:bit and how much is used. After much research I found the reason why I only had enough memory to store font patterns for 16 characters out of the 60 key on my keyboard was due to RAM limitations. Eventually, after trying a bunch of techniques to conserve memory I figured out how to embed the fonts entirely in FLASH memory. The following video shows the result.
It seems like a simple step forward, but this has been the toughest part of the project so far. Thankfully it is sorted out, but there is still significant work left to shoehorn a BLE stack into the micro:bit.
I think I will switch to mechanical tomorrow and get some packaging designed.
The big idea behind adding a keyboard and LCD to a micro:bit is to provide a low cost way for micro:bits to send text to each other.
When this all works the device will be the equivalent of a walkie-talkie except it will send text instead of voice.
The big question is what to call it?
Should it be:
- Walkie-Textie
- Type-N-Text
- micro:bit textr
- text:bit
- other
Please feel free to suggest other potential names in the comments below.
There is less than a week left in the project, so it is going to be a mad scramble to see how many of the remaining objectives can be achieved.
Upcoming blogs:
- how Stirling engines work
- micro:bit BLE radio
- start connecting some sensors to the PSoC6
- designing the sensor interface PCB
Related Links:
Bluetooth Unleashed Design Challenge
Bluetooth Unleashed Design Challenge: The Challengers
Bluetooth Unleashed Design Challenge: About This Challenge
Links to other blogs for this project:
Stirling Blue - Project Description - Blog 1
Stirling Blue - Unboxing Hero - Blog 2
Stirling Blue - micro:bit TXTR - Blog 3
Stirling Blue - Fuel Measurement - Blog 4
Stirling Blue - Interface Description - Blog 5
Stirling Blue - BBC micro:bit LCD - Blog 6
Stirling Blue - Power Measurement - Blog 7 (updated)
Stirling Blue - Bluetooth Terminal Awakening - Blog 8
Stirling Blue - PSoC Bluetooth Terminal Keyboard - Blog 9
Stirling Blue - Bluetooth Terminal - First Contact - Blog 10
Top Comments