Hello community,
For my Exam, I need to create a project with a grovepi and some sensors/led
At the beginning, everything worked fine, my button sensor gave me the right results, the leds were working fine, the RFID was good, and the DHT too (it is what I used at that moment), but for some reason, subtly, a part of the grovepi is not working any more.
I failed my exam last year because of that because I couldn’t find the cause, this year I did the project again, and it was working fine, until yesterday.
I had exactly the same problem as last year:
- My button is giving me 0, 218 or 255 values (not others, but randomly with the majority of 218)
- My leds doesn’t respond the majority of the time
At least, this year, my DHT is still working.
This year, I tried everything:
- I thought the OS was corrupted, so I reinstalled it from scratch (I did a script to help me install everything).
- I tried to change the captors on all digit input, but same result.
- I tried to debug step by step to know when it crash.
I don’t know why, but in the last try, it crashed just after I installed manually the grove pi package of python (and YES, I also attempted to install it with the recommanded script, it is what I’ve worked with since the beginning).
But I don’t know if it is linked at all.
I also saw on the log (below) that the SPI and the i2c are blacklisted, but I didn’t find where to remove it, and the file /etc/modprobe.d/raspi-blacklist.conf is empty.
To be honest, I don’t know where to look, my exam is next week, and even if I’m not so late, I would rather not fail because of a small problem I cannot find.
Kind regards,
Sebastien
PS: i didn’t know where to categorize it, if you can move it, or tell me, I can move it to the right place. Thank you.
UPDATE:
With your information, I tried to do an intensive debug, and i think i found out when it worked again when i disabled the nodered process.
The problem identified is that i can only read one sensor at a time. like if it has only one canal to get the information.
So i cheated a little bit with the delays and now everything is working. But i don’t know if it is normal to have only one canal? I know we don’t have infinity ones, but I didn’t think we only have one.
Check space left
================
Filesystem Size Used Avail Use% Mounted on
/dev/root 59G 8.3G 48G 15% /
devtmpfs 1.8G 0 1.8G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 8.6M 1.9G 1% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/mmcblk0p1 253M 48M 205M 19% /boot
tmpfs 383M 4.0K 383M 1% /run/user/1000
Check for dependencies
======================
python 2.7.16-1 install ok installed
python-pip 18.1-5+rpt1 install ok installed
git 1:2.20.1-2+deb10u6 install ok installed
libi2c-dev 4.1-1 install ok installed
python-serial 3.4-4 install ok installed
python-rpi.gpio 0.7.0-0.1~bpo10+4 install ok installed
i2c-tools 4.1-1 install ok installed
python-smbus 4.1-1 install ok installed
scratch 1.4.0.6~dfsg1-6 install ok installed
I2C still in blacklist
SPI still in blacklist
Check for addition in /modules
==============================
I2C-dev already there
i2c-bcm2708 already there
spi-dev already there
Hardware revision
=================
RPI4 Pi 4 Model B 4G v1.2
Check the /dev folder
=====================
i2c-1
spidev0.0
spidev0.1
ttyAMA0
USB device status
=================
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
Raspbian for Robots Version
===========================
cat: /home/pi/di_update/Raspbian_For_Robots/Version: No such file or directory
Hostname
========
nbel
Checking I2C bus for devices
============================
Checking I2C bus 0
==================
NOTE: it is normal for this one to fail
Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory
Checking I2C bus 1
==================
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- 04 -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Checking for firmware version
=============================
GrovePi has firmware version: 255.255.255