Skip to main content

CraftBeerPi Plugin for controlling actor using Waveshare's 2CH Triac HAT for Raspberry Pi

Project description

Triac Hat Actor for CraftBeerPi 4

This is a plugin for using Waveshare's 2CH Triac Hat for controlling actors in CraftBeerPi 4. You can find the documentation for this device here: https://www.waveshare.com/wiki/2-CH_TRIAC_HAT

This device is used for voltage regulation using a triac and have two channels for different actors.

Installation

You can install this package via Pypi.org using this command:

sudo pip3 install cbpi4-TriacHatActor

Alternatively you can download it using this command:

sudo pip3 install git+https://github.com/netanelklein/cbpi4-TriacHatActor.git

In order to do so you have to have Git installed on your system. You can do this simply by using this command:

sudo apt install git

Activating plugin in CraftBeerPi

In order for the plugin to show up in your CraftBeerPi system, you have to activate the plugin using this command:

cbpi add cbpi4-TriacHatActor

System configuration

You will have to enable the Interface that you want to use in raspi-config. in order to get there, use this command:

sudo raspi-config

Then go to Interface Options and then to Serial Port. There you should choose no for let login shell be accessible over serial and yes for Would you like the serial port hardware to be enabled?

If you want to use the I2C interface, you should enable it from the Interface Options under I2C. I personally haven't tried to use the Triac Hat with I2C, so there may be bugs there.

Parameters

  • Channel - Choose which of the Triac Hat channels you want to assign to this actor.
  • Interface - Choose between UART and I2C. Default is UART. Be aware that you must choose the same interface for all the actors that are connected to the Triac Hat.
  • Device Port - Choose the serial port in which the triac is connected. Usually it's /dev/ttyS0 or /dev/ttySerial0, so choose this if you're not sure.
  • Frequency - Your line frequency. 50 Hz is default as it is the most popular frequency around the world. In the US the frequency is 60 Hz.

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

cbpi4-TriacHatActor-0.0.6.tar.gz (183.6 kB view details)

Uploaded Source

File details

Details for the file cbpi4-TriacHatActor-0.0.6.tar.gz.

File metadata

  • Download URL: cbpi4-TriacHatActor-0.0.6.tar.gz
  • Upload date:
  • Size: 183.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for cbpi4-TriacHatActor-0.0.6.tar.gz
Algorithm Hash digest
SHA256 3c5d84577f3e560de2701915fded8691c0b821985af0edcb68637617e3d7b4c5
MD5 f486ad60356c821eefd5a85991823622
BLAKE2b-256 c06bac9050182b2100cc59a1bc16c1e62c5d04fa0e542c24cb587f14ffa07c57

See more details on using hashes here.

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