Skip to content

BUG FIX - AltSoftSerial pins are now defined correctly

Latest
Compare
Choose a tag to compare
@cyberboy666 cyberboy666 released this 07 May 05:10
· 1 commit to main since this release

it has come to my attention (with invaluable debugging help from Robert LaPorte) that the default pin definitions for the AltSoftSerial library ( TX = 5, RX=13) used in this project are not the same as the ones that are routed on the hardware ( TX = 9, RX = 4 )

image

image

(D4 = 4 & B5 = 9)

this is because the sparkfun pro-micro does not expose pin 13 on the ATmega32U4 ...

however inside the AltSoftSerial/config/AltSoftSerial_Boards.h L95-L105 we can see an alternative setup using timer1 and TX = 9, RX = 4

image

i can see that my local version of AltSoftSerial has this config switched around so the correct pins are sending serial, however this is in no way reflected in this repo - so anyone attempting to modify code for transcribe will pull the default mappings and their MIDI_DIN5_SERIAL ports will not work as expected (although they will work when flashed from my computer)

the solution to this is to fork AltSoftSerial and make these changes here - cyberboy666/AltSoftSerial

then in the platformio.ini in this project update the dependancies to point to this version of the serial library:

lib_deps = 
	felis/USB-Host-Shield-20 @ ^1.3.2
	blokaslabs/USBMIDI @ ^1.1.5
	https://github.com/cyberboy666/AltSoftSerial
	mathertel/OneButton@^2.0.2