Compare commits

...

6 commits

Author SHA1 Message Date
dherrada
839b3abf39 Fixed discord invite link 2020-07-08 16:49:04 -04:00
siddacious
d24bac8cd1 fixing blinka example 2020-05-15 17:11:22 -07:00
Kattni
63bd0f0d6d
Merge pull request #2 from adafruit/pylint-update
Ran black (py35), updated to pylint 2.x
2020-04-14 18:25:48 -04:00
dherrada
e27030cdc1
Ran black, updated to pylint 2.x 2020-04-14 16:32:06 -04:00
sommersoft
9e13900993 build.yml: add black formatting check
Signed-off-by: sommersoft <sommersoft@gmail.com>
2020-04-07 16:12:47 -05:00
Jeff Epler
c691667827
Merge pull request #1 from adafruit/update-rtd-link
Update RTD link to use CP subproject link
2020-04-02 14:50:47 -05:00
3 changed files with 19 additions and 12 deletions

View file

@ -40,9 +40,12 @@ jobs:
source actions-ci/install.sh
- name: Pip install pylint, black, & Sphinx
run: |
pip install --force-reinstall pylint==1.9.2 black==19.10b0 Sphinx sphinx-rtd-theme
pip install --force-reinstall pylint black==19.10b0 Sphinx sphinx-rtd-theme
- name: Library version
run: git describe --dirty --always --tags
- name: Check formatting
run: |
black --check --target-version=py35 .
- name: PyLint
run: |
pylint $( find . -path './adafruit*.py' )

View file

@ -6,7 +6,7 @@ Introduction
:alt: Documentation Status
.. image:: https://img.shields.io/discord/327254708534116352.svg
:target: https://discord.gg/nBQh6qu
:target: https://adafru.it/discord
:alt: Discord
.. image:: https://github.com/adafruit/Adafruit_CircuitPython_DS1841/workflows/Build%20CI/badge.svg

View file

@ -1,10 +1,6 @@
from time import sleep
import board
import busio
import adafruit_ds3502
i2c = busio.I2C(board.SCL, board.SDA)
ds3502 = adafruit_ds3502.DS3502(i2c)
####### NOTE ################
# This example is meant for use with Blinka/rasberry Pi due to the lack of analog pins.
# CircuitPython board users should run the "ds1841_simpletest.py" example
# WIRING:
# 1 Wire connecting VCC to RH to make a voltage divider using the
@ -12,15 +8,23 @@ ds3502 = adafruit_ds3502.DS3502(i2c)
# 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.
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:
ds3502.wiper = 127
ds1841.wiper = 127
print("Wiper value set to 127")
sleep(5.0)
ds3502.wiper = 0
ds1841.wiper = 0
print("Wiper value set to 0")
sleep(5.0)
ds3502.wiper = 63
ds1841.wiper = 63
print("Wiper value set to 63")
sleep(5.0)