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
  • Bench yousuf
  • 2022-12-15 19:35:42
A very informationrmative story and lots of really honest and forthright comments made! This certainly got me thinking about this issue, thank all.        original site
  • Floor yousuf
  • 2022-12-21 23:09:35
Your blog has the same post as another author but i like your better.~,`*`        메이저사이트
  • 5# yousuf
  • 2022-12-29 15:01:02
Impressive web site, Distinguished feedback that I can tackle. Im moving forward and may apply to my current job as a  pet sitter, which is very enjoyable, but I need to additional  expand. Regards.        essentials hoodie men
1234.. 18NextPage