def send_serial_message(text):
    monitor_module = pyarduino.base.serial_monitor

    settings = st_base.get_settings()
    serial_port = settings.get('serial_port', '')
    if serial_port in monitor_module.serials_in_use:
        serial_monitor = monitor_module.serial_monitor_dict.get(
            serial_port, None)
        if serial_monitor and serial_monitor.is_running():
            serial_monitor.send(text)
dataset/ETHPy150Open Robot-Will/Stino/stino/main.py/send_serial_message/original