Serial.begin(31250);

In order for me to use Midi output on my Arduino I must set my serial port to - Serial.begin(31250); No problem but what do I do if I want to use the serial monitor? Thanks, Goatboy :slight_smile:

What I did is have an easy way to switch between 9600 and 31250, i checked a button value on startup to switch to the pc mode. There may be some other kind of serial monitor that supports 31250.

Hey,

I’ve noticed this aswell, (Midi project going ATM).
For some reason the baudrate of 31250 isnt generally supported.

I looked into the python module “serial”, but that only supports these baudrates:

[('50', 50), ('75', 75), ('110', 110), ('134', 134), ('150', 150), ('200', 200), ('300', 300), ('600', 600), ('1200', 1200), ('1800', 1800), ('2400', 2400), ('4800', 4800), ('9600', 9600), ('19200', 19200), ('38400', 38400), ('57600', 57600), ('115200', 115200), ('230400', 230400), ('460800', 460800), ('500000', 500000), ('576000', 576000), ('921600', 921600), ('1000000', 1000000), ('1152000', 1152000), ('1500000', 1500000), ('2000000', 2000000), ('2500000', 2500000), ('3000000', 3000000), ('3500000', 3500000), ('4000000', 4000000)]

I dont know a solution to the problem unfortunatly. If somebody knows a way to allow python interpret the 31250 baudrate, please let me know!

Cheers, -Harry

Easiest solution would be to use the SoftwareSerial library (included with arduino), or maybe NewSoftSerial: NewSoftSerial 8 for 8 (MHz) | Arduiniana.

This lets you use other pins as serial outputs, so you can send your midi on a different port and still use the built in serial connections for monitoring / transmitting.

Cheers,
Paul