AUTD3 library wrapper for python
Project description
pyautd3
autd3 library for python3.6+
version: 0.4.1
Install
pip install pyautd3
or from this repository
pip install git+https://github.com/shinolab/pyautd.git
Requirements
If you are using Windows, install Npcap with WinPcap API-compatible mode (recomennded) or WinPcap.
If you are using Linux/MacOS, you may need to install and run pyautd3 as root.
sudo pip install pyautd3
sudo python
>>> import pyautd3
Exmaple
import sys
from pyautd3 import AUTD, Link
def get_adapter_name():
adapters = AUTD.enumerate_adapters()
for i, adapter in enumerate(adapters):
print('[' + str(i) + ']: ' + adapter[0] + ', ' + adapter[1])
index = int(input('choose number: '))
return adapters[index][0]
if __name__ == '__main__':
ifname = get_adapter_name()
autd = AUTD()
autd.add_device([0, 0, 0], [0, 0, 0])
# autd.add_device([0, 0, 0], [0, 0, 0])
link = Link.soem_link(ifname, 1)
autd.open_with(link)
firm_info_list = autd.firmware_info_list()
for i, firm in enumerate(firm_info_list):
print('[' + str(i) + ']: CPU: ' + firm[0] + ', FPGA' + firm[1])
f = AUTD.focal_point_gain(90, 80, 150)
m = AUTD.sine_modulation(150)
autd.append_gain_sync(f)
autd.append_modulation_sync(m)
print('press enter to start stm...')
sys.stdin.readline()
m = AUTD.modulation(255)
autd.append_modulation_sync(m)
f1 = AUTD.focal_point_gain(87.5, 80, 150)
f2 = AUTD.focal_point_gain(92.5, 80, 150)
autd.append_stm_gain(f1)
autd.append_stm_gain(f2)
autd.start_stm(50)
print('press enter to exit...')
sys.stdin.readline()
autd.finish_stm()
autd.dispose()
Author
Shun Suzuki, 2020
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyautd3-0.4.1.tar.gz
(5.3 kB
view hashes)
Built Distribution
pyautd3-0.4.1-py3-none-any.whl
(703.5 kB
view hashes)