Skip to main content

GitHub Issues GitHub Commit Maintained Build status badge MIT licensed

Python-OC03

The OC03 xChip is a low-voltage control relay module able to switch AC and DC loads. It is based on the PCA9554A and TLP241A.

The optically isolated relay is controlled by a PCA9554A IO expander, which provides an control interface to the switch. The PCA9554A has several selectable I2C addresses accessible via solder pads.

The TLP241A photorelay consist of a photo MOSFET optically coupled to an infrared light emitting diode which switches a AC or DC load. It provides an isolation voltage of 5000 Vrms, making it suitable for applications that require reinforced circuit insulation.

Usage

Mu-editor

Download Mu-editor

CW01 and CW02

  • Use XinaBoxUploader and flash MicroPython to the CW01/CW02.
  • Download Python packages from the REPL with the following code:
    import network
    import upip
    sta_if = network.WLAN(network.STA_IF)
    sta_if.active(True)
    sta_if.connect("ssid", "password")
    upip.install("xinabox-OC03")
    

CC03, CS11 and CW03

  • Download the .UF2 file for CC03/CS11/CW03 CircuitPython and flash it to the board.
  • TO DO

MicroBit

  • TO DO

Raspberry Pi

Requires Python 3

pip3 install xinabox-OC03

Example

from xOC03 import xOC03
from xCore import xCore

OC03 = xOC03()

# start OC03
OC03.init()

# sleep time
DELAY = 500

# infinite loop
while True:

    # close relay
    OC03.writePin(True)
    xCore.sleep(DELAY)

    # open relay
    OC03.writePin(False)
    xCore.sleep(DELAY)

Metadata

Release files for xinabox-OC03 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xinabox-OC03 0.0.5
File Size Uploaded Provenance Actions
xinabox-OC03-0.0.5.tar.gz 2.8 kB Without provenance Details for xinabox-OC03-0.0.5.tar.gz

Release files / xinabox-OC03-0.0.5.tar.gz

Download URL xinabox-OC03-0.0.5.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0481d1352893fc7c0f8052dc81a78cf8ed8def76333e463030b5fb6836884a63
BLAKE2b-256 checksum
How to use checksums
32a1a712811a6a0a424e2d159a07f30b0b5e0a748ad309c9cc2e5ee23e8f983a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

Security for xinabox-OC03 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page