'How do I access the other 3 ports on the Arduino Mega 2560?
I've been trying to send data from my MacBook to my Arduino. First the UNO. But I want to debug my program by printing the data on the serial monitor in the Arduino IDE. This didn't work with the Uno so I purchased the Mega 2560. I made an adapter by cutting off one end of a USB cable, crimping 4 pins onto it and hooking up the pins to tx1 18 & rx1 19 as described in several web explanations. With ground & 5v accordingly. On my laptop, I'm using python. this line:
arduino = serial.Serial(port='/dev/cu.usbmodem143401',
baudrate=115200, timeout=1)
didn't work with the UNO since this port was providing the IDE serial monitor - hence the purchase of the Mega.
So how do I designate the next port on the Mega?
If I use:
(.venv) Serial_Port > python -m serial.tools.list_ports
I get:
/dev/cu.BLTH
/dev/cu.Bluetooth-Incoming-Port
/dev/cu.BoseQC35II
/dev/cu.usbmodem14201
the last port is the one in which the Adruino is using as the monitor. But nothing suggesting the tx1 18 & rx1 19 port shows up. Without the standard USB connection I get:
(.venv) Serial_Port > python -m serial.tools.list_ports
/dev/cu.BLTH
/dev/cu.Bluetooth-Incoming-Port
/dev/cu.BoseQC35II
3 ports found
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
