from uf.wrapper.swift_api import SwiftAPI
from uf.utils.log import *
swift = SwiftAPI()
print(‘sleep 2 sec …’)
sleep(2)
print(‘device info: ‘)
print(swift.get_device_info())
print(’\nset X350 Y0 Z50 F1500 …’)
import time
swift.send_cmd_async(‘M2305 P4 N1 V16’)
swift.send_cmd_async(‘M2307 P4 V0 R25 G77 B51’)
time.sleep(5)
swift.send_cmd_async(‘M2307 P4 V0 R0 G0 B0’)
不需要用到2nd UART
注意:M2305 P4 N1 V16以及下面两行的P4是根据实际接线决定,如下图。
