Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
View: 74|Reply: 0

Orange Pi Zero and OPi.GPIO library for connect AS3935 sensor

[Copy link]

4

Threads

4

Posts

25

Credits

Novice

Rank: 1

Credits
25
Post time 2017-9-10 05:30:14 | Show all posts |Read mode
I'm implementing an Embedded Adventures MOD-1016 Lightning Detector AS3935 on a Orange Pi Zero with Armbian Operating System and the pcfens Raspberry Pi Library (https://github.com/pcfens/RaspberryPi-AS3935) these are the steps I did to try to make it work:

1. I used the following Orange Pi Zero pins to connect the sensor: 25 (Ground) - 1 (3v3 Power) - 11 IRQ (GPIO 17 on Raspberry or GPIO1 here on Orange Pi Zero) - 5 (SCL) - 3 (SDA). Now pin 11 on Orange Pi Zero does not match GPIO 17 as in Raspberry but with UART2_RX / PA01 / GPIO1.
2. I installed the Opi.GPIO library instead of that of Raspberry Rpi-GPIO to make pcfens library work for Raspberry Pi.
3. I've inserted some corrections to the library's "demo.py" script to run the sensor software. I changed the I2C address by setting it to 0X03 and changing the tuning and the noise.

Launching the AS3935 test software "demo.py" seems to work, I'm better off not just one error, but I see this message "UserWarning: Channel 17 is already in use, continuing anyway. Use GPIO.setwarnings (False) to disable warnings . "I think it means the door is already occupied.

How do I know if GPIO port 17 or better GPIO1 in Orange Pi Zero is used regularly by the AS3935 sensor?
Any idea to fix the error message?

Greetings from MAX.

You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2017-9-20 04:50 GMT+8 , Processed in 0.030601 second(s), 23 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list