Project Updates for 7/29/2018
I ran into another issue with trying to get the MCP3008 chip working. It uses SPI and apparently the Raspberry Pi only has to Chip Selects available for its use on the main SPI. Both of these are in use by the display and touchscreen which are higher priority than a battery level check. Now there is an auxiliary SPI as well, but that would end up taking 4 pins as opposed to the one or two pins I was planning on using because I have to use a different set of MISO, MOSI, and Clock pins as well. In order to do that, this means I will need 4 things to be in place:
- PiCheckVoltage will need to run fine over the auxiliary SPI
- I will need to create a shift register circuit for the keypad
- The circuit that houses both the MCP3008 and 74HC595 (two separate circuits using through-hole chips) will need to be able to fit in the case
- I will need to write a custom driver rather than use a device tree overlay
If any of those 4 things doesn't work, then the voltage check will need to be scrapped. If it's only the circuit fit that's a problem and it's really close, I may be able to design an SMD circuit that fits. Also, I'm not sure if I'll use proto-board or just use OSH Park to make the board even if it fits fine, That's mostly a time vs space issue since I would need to design the board and then it's a 12 day turnaround, so that could easily take 3 weeks total.
I was able to sort of get the device tree overlay working. Some of the buttons responded, but it also seemed to think there was other buttons being pressed. I think I will leave the overlay file as it is for now and start focusing on a custom driver in c because I think I may need more flexibility than the overlay can give me. I am aware that you can do alternate key maps so that if the alpha button we held, then the alpha keys would function and same with the 2nd key. However, I'd rather they work more like the original calculator.