try:
        while True:
            # 读取一行数据(假设每次发送的数据以换行符结尾)
            #data = ser.readline().decode("uint8").strip()
            data = ser.read().decode()
            # 判断接收到的数据并执行相应操作
            print(data)
            if data=='X':
                print("666666666666666666")# 执行你的Python文件,这里假设要执行的文件为example.py
                #execute_python_file("testCSI.py")
                execute_shell_file("example.sh")
                    #subprocess.run(["bash",script_path], check=True)
                #except Exception as e:
                #    print(f"Error executing the shell script: {e}")
		#print()
            elif data=='Y':
                print('3333333333333333333')
                execute_shell_file("example2 	.sh")
            else:
                print(f"Received: {data}")
    except KeyboardInterrupt:
        pass
    finally:
        # 关闭串口
        ser.close()
        print("Serial port closed.")
if __name__ == "__main__":
    main()