aosong | AOSONG Sensors Python 3 package
kandi X-RAY | aosong Summary
kandi X-RAY | aosong Summary
Python package that provides support for AOSONG Sensor. This package and it's modules have been organized to support additional AOSONG sensors. It currently only supports the AM2315 Temperature and Humidity Sensor. Additional sensors are encouraged and welcomed. Please submit a Pull Request. The original author of this library was Sopwith. This repository was originally forked from the code provided by the author on their blog. The purpose of the repository is to provide a pythonic library that can be installed with pip and setuptools.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Return the temperature in degrees
- Read the data from the device
- Convert celsius to fahrenheit
- Get current temperature
- Verify the CRC of a single character
- Return the contents of a file
- Return the temperature in celsius
aosong Key Features
aosong Examples and Code Snippets
Community Discussions
Trending Discussions on aosong
QUESTION
Note: Code is cross-compiled in windows 10.
Code:
...ANSWER
Answered 2019-Feb-22 at 14:43Seems there was an issue with the library itself which was making two reads, but because the read code was not sent the values came as 0, as it can be seen in the logs:
QUESTION
Greetins,
I recently bought a temperature & humidity sensor (aosong am2302). I hooked it to a rasp pi 3 and it works like charm with the adafruit library. The problem comes when i try to make it work on another board (described here). I used this library for gpio reading. I modified the file of beaglebone for gpio mapping and that's it. I run the tests and they work, so basically the lib looks like it works. So after that, I code the sensor reader and it doesnt work and I dont know why. After I run the sensor reader, If I check the file system, the gpio is exported.
The sensor is installed like this: -Power to 5V (also tried with 3.3v) -VCC to gpio -Ground to GND.
and here the code
...ANSWER
Answered 2017-Sep-20 at 17:00Some things to try that might get you going....
First increase the counter "counter++>10000" to something much larger, It could be that the new processor you are running increments the counter at a much faster rate and you just timeout before the pin drops.
If that doesn't work remove the timeout counter and loop forever in your source, also remove the sensor, then physically pull the data line to ground with a piece of wire and see if your code/new processor catches the signal change, at least then you know your source/hardware is configured correctly so you can focus your efforts elsewhere.
Double check the voltage compatibility between your new processor 'high' level and what the sensors 'high' threshold is to ensure it is catching a 'one' on the data line.
Lettus know how you go!
Tony
QUESTION
I am currently working on a project where I need to read out a DHT11 humidity and temperature sensor. The communication between the MCU and the serial device is quite low-level, but I managed to receive the measured values (humidity+temperature) as a byte array of length 4 (the 5th byte is the checksum):
Values that I receive from the DHT11 sensor:
...ANSWER
Answered 2017-May-20 at 09:46Unfortunately, both examples provided in the linked data sheet send zero for the decimal part. However, it appears from the description that the data from the upper byte can be added to the data from the lower byte divided by 256 (the number of states in the decimal portion of data):
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aosong
You can use aosong like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page