This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
flink_python [2023/11/02 08:24] – ursgraf | flink_python [2023/11/02 09:27] (current) – [How to Use] ursgraf | ||
---|---|---|---|
Line 5: | Line 5: | ||
</ | </ | ||
- | This is a Python wrapper for the [[flink_lib|flink Userspace Library]]. flink devices as well as all their integrated subdevices can be easily accessed, | + | This is a Python wrapper for the [[flink_lib|flink Userspace Library]]. flink devices as well as all their integrated subdevices can be easily accessed. The wrapper allows control of the high-level API as well as the low-level API. |
+ | ===== How to Use ===== | ||
+ | |||
+ | <code python> | ||
+ | import flink | ||
+ | import time | ||
+ | |||
+ | dev = flink.FlinkDevice() | ||
+ | dev.lsflink() | ||
+ | |||
+ | gpio = flink.FlinkGPIO() | ||
+ | gpio.setDir(pin, | ||
+ | gpio.setValue(pin, | ||
+ | time.sleep(1) | ||
+ | gpio.setValue(pin, | ||
+ | </ |