Boron - read midi signals

Hi Everybody!

I am trying to read MIDI notes from an instrument using this Arduino (5V) example code and circuit :

I’ve tested it and it works fine (simply turning the LED ON when a note is played).

I need some help with :

  1. Make this circuit work with the Boron board (5v -> 3.3v and other issues that maybe I am missing)

  2. Make the Serial read code fit with the Boron (at the moment there is a problem with the Bytes form -
    B00001111 which can’t be recognized as something that the IDE understands)

  3. Is it possible to use the SoftwareSerial.h library or should I use the Rx, Tx pins of the board and “lose” the serial print?

Thanks a lot!

That’s a Arduino specific notation I don’t really understand the use for as the common C/C++ notation of 0b00001111 should work there just as well.
When you add #include <Arduino.h> the B..... macros should be available too, but I’d rather stick with the standard.

There is no SoftSerial library for the Boron.

For the 5V vs. 3.3V: Since the circuit uses an opto coupler you’d just need to use one that’s good to be used with 3.3V (looking at datasheets is always advisable) and you’ll be good to go.

However, here is another discussion about that

Thanks !

Did a quick test, it seems like the 6N138 optocoupler -
works well with 3.3v as a VCC voltage, and it outputs ~3.3v
would it be safe to test it with Boron’s Rx Serial1 pin ?

Thanks again

When you supply the 6N138 with 3.3V its output will not exceed that value and so it’ll be safe to directly feed that into the RX.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.