adafruit / adafruit_circuitpython_sht4x Goto Github PK
View Code? Open in Web Editor NEWPython library for SHT4x temperature / humidity sensors
License: MIT License
Python library for SHT4x temperature / humidity sensors
License: MIT License
Initialized by: adafruit-circuitpython-raspberry_pi_pico_w-en_US-8.0.3.uf2
Inslall only "one" library "adafruit-circuitpython-sht4x" and "No space left on device" here.
install adafruit-circuitpython-sht4x
Looking in indexes: http://127.0.0.1:36628
127.0.0.1 - - [02/Mar/2023 18:55:51] "GET /adafruit-circuitpython-sht4x/ HTTP/1.1" 200 -
Collecting adafruit-circuitpython-sht4x
Using cached http://127.0.0.1:36628/adafruit-circuitpython-sht4x/adafruit_circuitpython_sht4x-1.0.15-py3-none-any.whl/
127.0.0.1 - - [02/Mar/2023 18:55:53] "GET /adafruit-circuitpython-busdevice/ HTTP/1.1" 200 -
Collecting adafruit-circuitpython-busdevice
Using cached http://127.0.0.1:36628/adafruit-circuitpython-busdevice/adafruit_circuitpython_busdevice-5.2.3-py3-none-any.whl/
127.0.0.1 - - [02/Mar/2023 18:55:55] "GET /adafruit-blinka/ HTTP/1.1" 200 -
Collecting Adafruit-Blinka
Using cached http://127.0.0.1:36628/adafruit-blinka/Adafruit_Blinka-8.15.2-py3-none-any.whl/
127.0.0.1 - - [02/Mar/2023 18:55:57] "GET /pyftdi/ HTTP/1.1" 200 -
Collecting pyftdi>=0.40.0
Using cached http://127.0.0.1:36628/pyftdi/pyftdi-0.54.0-py3-none-any.whl/
127.0.0.1 - - [02/Mar/2023 18:55:59] "GET /adafruit-platformdetect/ HTTP/1.1" 200 -
Collecting Adafruit-PlatformDetect>=3.13.0
Using cached http://127.0.0.1:36628/adafruit-platformdetect/Adafruit_PlatformDetect-3.40.3-py3-none-any.whl/
127.0.0.1 - - [02/Mar/2023 18:56:01] "GET /adafruit-pureio/ HTTP/1.1" 200 -
Collecting Adafruit-PureIO>=1.1.7
Using cached Adafruit_PureIO-1.1.10-py3-none-any.whl
127.0.0.1 - - [02/Mar/2023 18:56:02] "GET /adafruit-circuitpython-typing/ HTTP/1.1" 200 -
Collecting adafruit-circuitpython-typing
Using cached http://127.0.0.1:36628/adafruit-circuitpython-typing/adafruit_circuitpython_typing-1.8.3-py3-none-any.whl/
127.0.0.1 - - [02/Mar/2023 18:56:04] "GET /pyusb/ HTTP/1.1" 200 -
Collecting pyusb!=1.2.0,>=1.0.0
Using cached http://127.0.0.1:36628/pyusb/pyusb-1.2.1-py3-none-any.whl/
127.0.0.1 - - [02/Mar/2023 18:56:06] "GET /pyserial/ HTTP/1.1" 200 -
Collecting pyserial>=3.0
Using cached http://127.0.0.1:36628/pyserial/pyserial-3.5-py2.py3-none-any.whl/
127.0.0.1 - - [02/Mar/2023 18:56:07] "GET /typing-extensions/ HTTP/1.1" 200 -
Collecting typing-extensions~=4.0
Using cached http://127.0.0.1:36628/typing-extensions/typing_extensions-4.5.0-py3-none-any.whl/
127.0.0.1 - - [02/Mar/2023 18:56:09] "GET /adafruit-circuitpython-requests/ HTTP/1.1" 200 -
Collecting adafruit-circuitpython-requests
Using cached http://127.0.0.1:36628/adafruit-circuitpython-requests/adafruit_circuitpython_requests-1.13.0-py3-none-any.whl/
Installing collected packages: pyserial, Adafruit-PlatformDetect, typing-extensions, pyusb, Adafruit-PureIO, pyftdi, adafruit-circuitpython-requests, Adafruit-Blinka, adafruit-circuitpython-typing, adafruit-circuitpython-busdevice, adafruit-circuitpython-sht4x
Successfully installed Adafruit-Blinka-8.15.2 Adafruit-PlatformDetect-3.40.3 Adafruit-PureIO-1.1.10 adafruit-circuitpython-busdevice-5.2.3 adafruit-circuitpython-requests-1.13.0 adafruit-circuitpython-sht4x-1.0.15 adafruit-circuitpython-typing-1.8.3 pyftdi-0.54.0 pyserial-3.5 pyusb-1.2.1 typing-extensions-4.5.0
Starting to apply changes to the target.
Copying adafruit_circuitpython_busdevice....
Copying typing_extensions..
Copying adafruit_circuitpython_requests..
Copying adafruit_circuitpython_typing..........
Copying Adafruit_PlatformDetect.......
Copying pyserial.
Copying pyusb................
Copying Adafruit_PureIO...Error [Errno 28] No space left on device
It is not clear from the Adafruit documentation right now whether one can change the i2c address in order to use two sensor boards at once. It is clear from the Sensirion documentation that there is no hardware solution to change the address like the older SHT3x had.
There are missing type annotations for some functions in this library.
The typing
module does not exist on CircuitPython devices so the import needs to be wrapped in try/except to catch the error for missing import. There is an example of how that is done here:
try:
from typing import List, Tuple
except ImportError:
pass
Once imported the typing annotations for the argument type(s), and return type(s) can be added to the function signature. Here is an example of a function that has had this done already:
def wrap_text_to_pixels(
string: str, max_width: int, font=None, indent0: str = "", indent1: str = ""
) -> List[str]:
If you are new to Git or Github we have a guide about contributing to our projects here: https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github
There is also a guide that covers our CI utilities and how to run them locally to ensure they will pass in Github Actions here: https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/check-your-code In particular the pages: Sharing docs on ReadTheDocs
and Check your code with pre-commit
contain the tools to install and commands to run locally to run the checks.
If you are attempting to resolve this issue and need help, you can post a comment on this issue and tag both @FoamyGuy and @kattni or reach out to us on Discord: https://adafru.it/discord in the #circuitpython-dev
channel.
The following locations are reported by mypy to be missing type annotations:
Solution:
Comment print(new_mode), line 168, in
def mode(self, new_mode):
print(new_mode)
if not Mode.is_valid(new_mode):
raise AttributeError("mode must be a Mode")
self._mode = new_mode
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.