Skip to main content

A module to control GPIO

Project description

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-softpwm

from gpioc.pwm import Pwm
from gpioc.chips.H616 import *
import time

led = Pwm(PC13)
led.frequency = 1000
while 1:
    for i in range(1,100,5):
        led.duty_cycle = i
        time.sleep(0.1)

Project details


Download files

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

Source Distribution

gpioc-1.5.tar.gz (34.8 kB view details)

Uploaded Source

File details

Details for the file gpioc-1.5.tar.gz.

File metadata

  • Download URL: gpioc-1.5.tar.gz
  • Upload date:
  • Size: 34.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for gpioc-1.5.tar.gz
Algorithm Hash digest
SHA256 6b6edfd493f68e84747f4d93c4637bea5ed01806b978fff1545520ba83502640
MD5 4b53be2f2227885b2b86c0603ec34872
BLAKE2b-256 8e0718a9cd7b81396622a7d6e401d6d4265dceb2853063dcc5f82cc330f7cf39

See more details on using hashes here.

Provenance

The following attestation bundles were made for gpioc-1.5.tar.gz:

Publisher: publish-to-pypi.yml on sc-bin/gpioc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page