Serial communication with your Melon Green, lets you configure it. There is also other functionalities for diagnostics, reading sensors, etc.
- Prepare an USB to Serial adapter/converter and appropriated cable, like FTDIs.
Connect the adapter to host ( PC, Smart-phone etc.), then check for availability. Install or Update Drivers if needed. - Find COM / Serial Port Name
Under Mac, in the Terminal window, type inls /dev/cu.*
. The port name which we need later is/dev/cu.usbserial-###
where the #s are going to be unique for each cable.
For Linux/Unix, typels /dev/ttyUSB*
. You'll receive something likettyUSB0
.
If you are using Windows os, go to the Device Manager and look for an entry underPorts (COM & LPT)
. That's likeUSB Serial Port (COM#)
. If you don't find the COM port, make sure that the cable is plugged in, and check if you installed the required driver like VCP Driver(s) for FTDI devices.
For windows set the port's baud rate to 9600 (board's default). - Connect the M.G. board to the host via adapter:
Adapter's Rx to Board's Tx, and vice versa aTx to bRx.
Remember Common Ground (aGND to bGND).
- Connect the duino to host via USB cble
- Find COM / Serial Port Name:
Take a look at Arduino IDE's Status-bar orMenu-bar -> Tools -> port
.
- Setup a reliable serial monitor application
Note: Don't use Arduino IDE Serial Monitor, or you'll find yourself in a mess. It doesn't have some [standard] features like page break. More comfortable Alternatives are:
▧ PuTTY [Windows, Linux]
▧ Screen [Mac, Linux] - Open and configure serial monitor
Note: Melon Green's default baud rate is9600
, but you can change it fromMelon_Green/modules/Presets.h
.
Mac/Linux: Type in Terminal:screen <serial_port_name> <baud_rate>
.
Note! If you faced errors like this:bash: /dev/ttyUSB#: Permission denied
, run it as super usersudo screen /dev/ttyUSB# 9600
Windows: RunPuTTY
. Select the radio Serial from Session, then change Serial line to COM# and Speed to baud rate (9600). From Categories, select Terminal, then from the Line discipline options fieldset, select the both 'Force on' radios. From Categories, select Connection/Serial, change Flow control to none. click on Open button. - Restart board or type
0
(Zero). You'll see the CLI Menu.