I'm in the process of building a calculator for fun. It has a 16x2 LCD screen along with 18 switches. The board is a Sparkfun pro micro 5V, 16MHz
The switches are wired in a matrix along with diodes to be able to read individual key pressed while using a limited number of pins.
I have the keypad working, I am able to print the right key as they are pressed or released.
I have the LCD working, I am able to print text on it nicely.
When I try to compile a sketch with both pieces of code mixed the board crashes (no text displayed, not event triggered from the keypad) and disappears (the usb connection is lost, serial connection is also broken)
On Ubuntu, it also freezes my computer, on windows the board just disappears from the connected devices list.
Here is the code I'm using: calculator/main.cpp at master · guyver2/calculator · GitHub
In its current shape the code works but only uses the keypad, almost everything related to the LCD screen is commented out.
I'm only having issue with the software part, the wiring is completely the same (LCD+switches) for all tests (see code for the pins used).
I'm using the adafruit_liquidCrystal along with the adafruit keypad libraries for consietency, but the same exat issue happens with the original versions of these libs:
LCD screen from Adafruit: Standard LCD 16x2 + extras [white on blue] : ID 181 : $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits
Arduino Pro Micro 5V, 16MHz: https://www.sparkfun.com/products/12640
Any tip would help. I'm more a SW than HW guy and might have missed something obvious in the way...