Skip to main content

AUTD3 library wrapper for python

Project description

build Publish to PyPI

pyautd3

autd3 library for python3.6+

version: 0.4.0

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

from pyautd3 import *
import sys


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__':
    adapter = get_adapter_name()

    autd = AUTD()

    autd.add_device([0, 0, 0], [0, 0, 0])
    # autd.add_device([0, 0, 0], [0, 0, 0])

    autd.open(LinkType.SOEM, adapter)

    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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyautd3, version 0.4.0
Filename, size File type Python version Upload date Hashes
Filename, size pyautd3-0.4.0-py3-none-any.whl (693.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pyautd3-0.4.0.tar.gz (5.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page