I've created a device for measuring system latency, first using an arduino, then an itsy-bitsy, and now a custom PCB. I designed the Windows software/driver/whatever it's called that reads the USBs input, but an EE friend has helped me port it from each different config to the next.
Since this is the case, I'm not sure what my best options are for making the program portable.
One of the first lines in the program is a major culprit:
// LiquidCrystal(rs, rw, enable, d4, d5, d6, d7) //Arduino pinout?
// LiquidCrystal lcd(4, 6, 8, 10, 11, 12, 13); //adafruit itsybitsy prototype version
LiquidCrystal lcd(8, 6, 4, 0, 1, 9, 5); //syslat custom pcb version
Should I be using something like:
#IFDEF __ARDUINO__
LiquidCrystal(rs, rw, enable, d4, d5, d6, d7) //Arduino pinout?
#IFDEF __ITSYBITSY__
LiquidCrystal lcd(4, 6, 8, 10, 11, 12, 13); //adafruit itsybitsy prototype version
#IFDEF __CUSTOMPCB__
LiquidCrystal lcd(8, 6, 4, 0, 1, 9, 5); //syslat custom pcb version
Or something else?
Here's the full source (225 lines) if needed: GitHub - Skewjo/SysLat_Firmware: Arduino firmware for SysLat project