Skip to content

Commit

Permalink
更新python库描述文件
Browse files Browse the repository at this point in the history
  • Loading branch information
sc-bin committed May 13, 2024
1 parent 0c56304 commit aa44d06
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 18 deletions.
35 changes: 35 additions & 0 deletions README_PY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## support chips
- Allwinner H616

## example-gpio
```
from gpioc.chips.H616 import *
import time
key = PC12
led = PC13
key.init(key.IN,key.PULL_UP)
led.init(led.OUT)
PC12.init(PC12.IN,PC12.PULL_UP)
PC13.init(PC13.OUT)
while True:
time.sleep(0.1)
if key.value() == 0:
led.value(1)
else:
led.value(0)
```
## example-pwm
```
from gpioc.pwm import Pwm
from gpioc.chips.H616 import *
import time
led = Pwm(PC13.gpio_num)
led.frequency = 1000
while 1:
for i in range(1,100,5):
led.duty_cycle = i
time.sleep(0.1)
```
17 changes: 0 additions & 17 deletions pypi_description.txt

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
author_email="[email protected]",
description="A module to control GPIO",
platforms=['manylinux'],
long_description = open('README.md').read(),
long_description = open('README_PY.md').read(),
license = 'MIT',
url="https://github.com/sc-bin/gpioc",
packages=find_packages(),
Expand Down

0 comments on commit aa44d06

Please sign in to comment.