Compare commits
No commits in common. "master" and "update-rtd-link" have entirely different histories.
master
...
update-rtd
3 changed files with 12 additions and 19 deletions
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
|
|
@ -40,12 +40,9 @@ jobs:
|
||||||
source actions-ci/install.sh
|
source actions-ci/install.sh
|
||||||
- name: Pip install pylint, black, & Sphinx
|
- name: Pip install pylint, black, & Sphinx
|
||||||
run: |
|
run: |
|
||||||
pip install --force-reinstall pylint black==19.10b0 Sphinx sphinx-rtd-theme
|
pip install --force-reinstall pylint==1.9.2 black==19.10b0 Sphinx sphinx-rtd-theme
|
||||||
- name: Library version
|
- name: Library version
|
||||||
run: git describe --dirty --always --tags
|
run: git describe --dirty --always --tags
|
||||||
- name: Check formatting
|
|
||||||
run: |
|
|
||||||
black --check --target-version=py35 .
|
|
||||||
- name: PyLint
|
- name: PyLint
|
||||||
run: |
|
run: |
|
||||||
pylint $( find . -path './adafruit*.py' )
|
pylint $( find . -path './adafruit*.py' )
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ Introduction
|
||||||
:alt: Documentation Status
|
:alt: Documentation Status
|
||||||
|
|
||||||
.. image:: https://img.shields.io/discord/327254708534116352.svg
|
.. image:: https://img.shields.io/discord/327254708534116352.svg
|
||||||
:target: https://adafru.it/discord
|
:target: https://discord.gg/nBQh6qu
|
||||||
:alt: Discord
|
:alt: Discord
|
||||||
|
|
||||||
.. image:: https://github.com/adafruit/Adafruit_CircuitPython_DS1841/workflows/Build%20CI/badge.svg
|
.. image:: https://github.com/adafruit/Adafruit_CircuitPython_DS1841/workflows/Build%20CI/badge.svg
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
####### NOTE ################
|
from time import sleep
|
||||||
# This example is meant for use with Blinka/rasberry Pi due to the lack of analog pins.
|
import board
|
||||||
# CircuitPython board users should run the "ds1841_simpletest.py" example
|
import busio
|
||||||
|
import adafruit_ds3502
|
||||||
|
|
||||||
|
i2c = busio.I2C(board.SCL, board.SDA)
|
||||||
|
ds3502 = adafruit_ds3502.DS3502(i2c)
|
||||||
|
|
||||||
# WIRING:
|
# WIRING:
|
||||||
# 1 Wire connecting VCC to RH to make a voltage divider using the
|
# 1 Wire connecting VCC to RH to make a voltage divider using the
|
||||||
|
|
@ -8,23 +12,15 @@
|
||||||
|
|
||||||
# As this code runs, measure the voltage between ground and the RW (wiper) pin
|
# As this code runs, measure the voltage between ground and the RW (wiper) pin
|
||||||
# with a multimeter. You should see the voltage change with each print statement.
|
# with a multimeter. You should see the voltage change with each print statement.
|
||||||
from time import sleep
|
|
||||||
import board
|
|
||||||
import busio
|
|
||||||
import adafruit_ds1841
|
|
||||||
|
|
||||||
i2c = busio.I2C(board.SCL, board.SDA)
|
|
||||||
ds1841 = adafruit_ds1841.DS1841(i2c)
|
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
ds1841.wiper = 127
|
ds3502.wiper = 127
|
||||||
print("Wiper value set to 127")
|
print("Wiper value set to 127")
|
||||||
sleep(5.0)
|
sleep(5.0)
|
||||||
|
|
||||||
ds1841.wiper = 0
|
ds3502.wiper = 0
|
||||||
print("Wiper value set to 0")
|
print("Wiper value set to 0")
|
||||||
sleep(5.0)
|
sleep(5.0)
|
||||||
|
|
||||||
ds1841.wiper = 63
|
ds3502.wiper = 63
|
||||||
print("Wiper value set to 63")
|
print("Wiper value set to 63")
|
||||||
sleep(5.0)
|
sleep(5.0)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue