Comments (7)
Did you remember to enable the I2C device driver?
You may also need to set the I2C bus to 1.
from raspberrypi-as3935.
Thank you for your answer, I2C bus was set to 1, the AS3935 is detected with i2cdetect -y 1 in position 3
What do you mean by enable the I2C device driver?
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 03 -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- 36 -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
from raspberrypi-as3935.
By driver I mean the kernel module - that i2cdetect works makes me think it's working as expected.
Can you try running the python script as root (or using sudo)? I doubt that's it, but it'd be good to confirm.
from raspberrypi-as3935.
Same here, i2c is detecting module as 03 on bus 1. And getting very same error, with sudo too. Running on Raspberry Pi 2b.
from raspberrypi-as3935.
Same error when running the script with sudo.
from raspberrypi-as3935.
same
File "demo.py", line 17, in
sensor.calibrate(tun_cap=0x0F)
File "/home/pi/RaspberryPi-AS3935/RPi_AS3935/RPi_AS3935.py", line 24, in calibrate
self.set_byte(0x08, (self.registers[0x08] & 0xF0) | tun_cap)
File "/home/pi/RaspberryPi-AS3935/RPi_AS3935/RPi_AS3935.py", line 222, in set_byte
self.i2cbus.write_byte_data(self.address, register, value)
IOError: [Errno 121] Remote I/O error
from raspberrypi-as3935.
Hey guys i noticed something interesting. Sensor is actually starting working when GND of Raspberry or sensor ground is connected to earth, or u just touch it with a finger. This might explain why for example sensor can work with LAN cable, but not on wifi.
from raspberrypi-as3935.
Related Issues (20)
- Constant false detection HOT 2
- Help on sensor.set_indoors(True) HOT 5
- Two sensors, not working. HOT 8
- calibration methods added HOT 4
- Add more documentation
- several coments on AS3935 library HOT 6
- Help about new issue raised after latest update HOT 9
- Input/output error HOT 10
- Bugfix found in fork HOT 1
- AS3935 bus address HOT 4
- Output to file HOT 2
- automatic antenna tuning HOT 1
- IOError: [Errno 121] Remote I/O error when LAN cable unplugged HOT 6
- TypeError: 'module' object is not callable with Python 3.7.3 HOT 3
- demo.py
- Any chance you could add an SPI interface option as well? HOT 1
- AS3935.py; set_indoors missing set_byte command HOT 4
- GPIO Pin for IRQ
- Time delay before reading interrupt HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raspberrypi-as3935.