1602 views|0 replies

6818

Posts

11

Resources
The OP
 

[Domestic RISC-V Linux Board Fang·Starlight VisionFive Trial Report] Python output HELLOWORLD [Copy link]

 

[Purpose] The Fang·Xingguang development board and the DWIN serial port screen are realized through serial port communication. First of all, the serial port debugging must be passed.

1. Connect to the serial port:

2. The serial port of the development board is ttyS0, and the file is located at /dev/ttyS0. First, you need to obtain read and write permissions, otherwise an error will occur when opening the device:

sudo chmod -R 777 /dev/ttyUSB0

3. Enter python:

>>> import serial
>>> ser = serial.Serial("/dev/ttyS0",115200,timeout=0.5)
>>> str_data = "hello world\r\n"
>>> data_send = str_data.encode("gbk")
>>> ser.write(data_send)
4. Open the serial terminal, and you can receive: hello world:

[Summary] The fedora firmware provided by starfive has already installed python3.9, and many modules have also been installed. So the project should progress quickly. . .

This post is from Domestic Chip Exchange
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list