How to manage GPIO on OrangePI Zero 2 看全部

Edited by FedericoCoppola at 2021-7-31 06:20

Hi all,
I have received a new Orange Pi Zero 2 (512MB of RAM) to build a very small weather station.
My goal is to connect and manage DHT22 sensor to collect temperature and humidity data.

I installed on a micro SD card Debian and the system is running properly in this moment.
After that I installed Python3 software necessary to my project.
I am try to follow this guide: https://f1atb.fr/index.php/2020/10/03/dht22-and-orange-pi-zero/
I know that the guide talks about Orange Pi Zero and not about Orange Pi Zero 2, but I have not found any information about Orange Pi Zero 2 and DHT22.

In this moment, I fails to try communication between Orange PI Zero 2 and DHT22 sensor because I do not understand how to identiy GPIO pins.

I have just a very poor information about GPIO (I have attached a picture that I collected from the web store that sells this board).

I need a digital GPIO PIN to use as input pin for DHT22 data collected.

How can I found the real pins' name?

For example I tried to manage pin PC9 (You can see this pin inside the picture attached to this post) but it did not worked.

>>> PIN=port.PC9
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'pyA20.gpio.port' has no attribute 'PC9'



What can I do?

Any suggestions?

Best regards!
Federico


attachment: 您需要登录才可以下载或查看附件。没有账号?Register
Hi,
The tutorial you followed installs a GPIO library specificly for Orange Pi Zero.
The guy who wrote this library only created it for OPi Zero not OPi Zero2

https://github.com/nvl1109

Therefore this tutorial will not work.
The pin names for OPi Zero 2 can be found on this link:

https://linux-sunxi.org/Xunlong_Orange_Pi_Zero_Plus_2

You will need to find an alternate python controlled GPIO library for the Orane Pi zero 2,
then modify the code.

The alternative is to buy the Orange Pi Zero, as they are pretty inexpensive
Hope that helps
My mother spoke disparagingly of mushrooms believing that they had little nutritional content- however she was very wrong. Mushrooms are sources of minerals such as copper, potassium, selenium, and ergothionine, which has antioxidant properties and may help protect against cancer. Copper is necessary in our diets because it helps in the production of healthy red blood cells and is essential for healthy nerves and bones. Potassium helps to control and normalize blood pressure, so assisting the proper functioning of the nerves and muscles, which includes the heart..          Homepage
It is truly a nice and useful piece of info. I’m satisfied that you shared this useful information with us. Please keep us up to date like this. Thanks for sharing.        안전놀이터
This web page is usually a walk-through for all of the info it suited you in regards to this and didn’t know who must. Glimpse here, and you’ll undoubtedly discover it.        Ac installation las vegas
1234.. 17NextPage