Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Simple assembler to convert pioasm to bytes

License

NotificationsYou must be signed in to change notification settings

adafruit/Adafruit_CircuitPython_PIOASM

Repository files navigation

Introduction

Documentation StatusDiscordBuild StatusCode Style: Ruff

Simple assembler to convert pioasm to bytes

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem.This is easily achieved by downloadingthe Adafruit library and driver bundle.

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfromPyPI. To install for current user:

pip3 install adafruit-circuitpython-pioasm

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-pioasm

To install in a virtual environment in your current project:

mkdir project-name&&cd project-namepython3 -m venv .venvsource .venv/bin/activatepip3 install adafruit-circuitpython-pioasm

Usage Example

importtimeimportrp2pioimportboardimportadafruit_pioasmsquarewave=""".program squarewave    set pins 1 [1]  ; Drive pin high and then delay for one cycle    set pins 0      ; Drive pin low"""assembled=adafruit_pioasm.assemble(squarewave)sm=rp2pio.StateMachine(assembled,frequency=4000,init=adafruit_pioasm.assemble("set pindirs 1"),first_set_pin=board.LED,)print("real frequency",sm.frequency)time.sleep(120)

Documentation

API documentation for this library can be found onRead the Docs.

For information on building library documentation, please check outthis guide.

Contributing

Contributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.

About

Simple assembler to convert pioasm to bytes

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors19

Languages


[8]ページ先頭

©2009-2025 Movatter.jp