sipeed / MaixPy-v1

MicroPython for K210 RISC-V, let's play with edge AI easier
https://wiki.sipeed.com/maixpy
Other
1.68k stars 439 forks source link

Problem when connecting Maixduino and MaixSenseA010 with uart #485

Open gakutasu opened 1 year ago

gakutasu commented 1 year ago

I'm very confused as to where to ask this issue. I feel like the code is likely the culprit, so I'll ask here.

[Conclusion] MaixSenseA010 cannot receive AT commands well.

I am trying to connect Maixduino and MaixSenseA010 with uart. I confirmed that the AT command can be sent with Maixduino, but the command is not reflected in A010.

Below is the maixduino code

from fpioa_manager import fm
from machine import UART
from Maix import GPIO
from board import board_info
import lcd, image, utime

fm.register(board_info.PIN1, fm.fpioa.UART1_TX, force=True)
fm.register(board_info.PIN0, fm.fpioa.UART1_RX, force=True)
uart = UART(UART.UART1, 115200, 8, 0, 0, timeout=1000, read_buf_len=4096)

def uart_readBytes():
    return uart.read()

def uart_hasData():
    return uart.any()

def uart_sendCmd(cmd):
    uart.write(cmd)

utime.sleep_ms(1000)

uart_sendCmd(b"AT+FPS=5\r")

#while

I have verified that the pin numbers are correct. I have also confirmed that AT commands are being sent with this code.

My guess is that the welcome message hampers communication in some way. キャプチャ

Any information is fine, so please support me. Thank you.

Firmware:maixpy_v0.6.2_84_g8fcd84a58.bin kflash_gui:kflash_gui_v1.8.1_windows.7z MaixPy:v0.2.5