@Extra could you try this plz ?
Edit: I’ve checked and it has loaded
$ lsmod | grep spi_
spi_bcm2835 24576 0
@Extra could you try this plz ?
Edit: I’ve checked and it has loaded
$ lsmod | grep spi_
spi_bcm2835 24576 0
I fixed it to: dtparam=spi=on
rebooted and it still didn’t work.
I connected my button to GPIO 10 and the ground directly across from it and when I pushed it, nothing happened.
I also tried GPIO 27 but got this:
Traceback (most recent call last):
File "/home/commander/Test.py", line 4, in <module>
GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) # Set pin 27 to be an input pin and set initial value to be pulled low (off)
ValueError: The channel sent is invalid on a Raspberry Pi
I inputted dmesg | grep -i spi
into the terminal and I didn’t get anything(no output message/results)
I also tired lsmod | grep spi_ spi_bcm2835 24576 0
and got:
spi_bcm2835 24576 0
bash: spi_bcm2835: command not found
This is what I get when I did lsmod:
Module Size Used by
rfcomm 53248 4
snd_seq_dummy 16384 0
snd_hrtimer 16384 1
snd_seq 86016 7 snd_seq_dummy
snd_seq_device 20480 1 snd_seq
cmac 16384 2
algif_hash 20480 1
algif_skcipher 20480 1
af_alg 32768 6 algif_hash,algif_skcipher
bnep 28672 2
hci_uart 49152 1
btbcm 24576 1 hci_uart
bluetooth 479232 33 hci_uart,btbcm,bnep,rfcomm
ecdh_generic 16384 1 bluetooth
ecc 32768 1 ecdh_generic
evdev 24576 7
joydev 28672 0
zram 28672 1
zsmalloc 36864 1 zram
brcmfmac 323584 0
brcmutil 24576 1 brcmfmac
sha256_generic 16384 0
sha256_arm64 28672 0
spidev 24576 0
bcm2835_codec 49152 0
bcm2835_isp 32768 0
bcm2835_v4l2 45056 0
cfg80211 868352 1 brcmfmac
bcm2835_mmal_vchiq 40960 3 bcm2835_codec,bcm2835_v4l2,bcm2835_isp
v4l2_mem2mem 40960 1 bcm2835_codec
rfkill 36864 8 bluetooth,cfg80211
videobuf2_vmalloc 20480 1 bcm2835_v4l2
videobuf2_dma_contig 24576 2 bcm2835_codec,bcm2835_isp
videobuf2_memops 20480 2 videobuf2_vmalloc,videobuf2_dma_contig
videobuf2_v4l2 32768 4 bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem,bcm2835_isp
videobuf2_common 61440 5 bcm2835_codec,videobuf2_v4l2,bcm2835_v4l2,v4l2_mem2mem,bcm2835_isp
snd_bcm2835 28672 2
videodev 311296 6 bcm2835_codec,videobuf2_v4l2,bcm2835_v4l2,videobuf2_common,v4l2_mem2mem,bcm2835_isp
v3d 81920 4
mc 61440 6 videodev,bcm2835_codec,videobuf2_v4l2,videobuf2_common,v4l2_mem2mem,bcm2835_isp
crct10dif_ce 20480 1
raspberrypi_hwmon 16384 0
gpu_sched 45056 1 v3d
vc_sm_cma 36864 2 bcm2835_mmal_vchiq,bcm2835_isp
spi_bcm2835 24576 0
rpivid_mem 16384 0
nvmem_rmem 16384 0
uio_pdrv_genirq 16384 0
uio 24576 1 uio_pdrv_genirq
sch_fq_codel 20480 7
binfmt_misc 24576 1
crypto_user 16384 0
fuse 135168 3
ip_tables 32768 0
x_tables 40960 1 ip_tables
ipv6 536576 156
vc4 282624 23
snd_soc_core 237568 1 vc4
snd_compress 20480 1 snd_soc_core
snd_pcm_dmaengine 20480 1 snd_soc_core
snd_pcm 139264 4 snd_bcm2835,snd_compress,snd_soc_core,snd_pcm_dmaengine
snd_timer 36864 3 snd_seq,snd_hrtimer,snd_pcm
snd 98304 13 snd_seq,snd_seq_device,snd_bcm2835,snd_timer,snd_compress,snd_soc_core,snd_pcm
drm_kms_helper 253952 3 vc4
syscopyarea 16384 1 drm_kms_helper
sysfillrect 16384 1 drm_kms_helper
sysimgblt 16384 1 drm_kms_helper
fb_sys_fops 16384 1 drm_kms_helper
drm 565248 13 gpu_sched,drm_kms_helper,v3d,vc4
drm_panel_orientation_quirks 24576 1 drm
backlight 20480 1 drm
cec 73728 1 vc4
I guess that SPI is loaded now (lsmod output) BUT is it really what you wanted ?
I was thinking again and maybe I got a little carried away by focusing on the SPI problem related to the pin number you were indicating.
Could you please take a look at this video: How to Use Push Buttons With Raspberry Pi GPIO (with Python gpiozero) - YouTube ?
Or this website : Using a push button with Raspberry Pi GPIO | Raspberry Pi HQ
Perhaps this will clarify your request/need. And then you can give us feedback.
Then maybe python-gpiozero or python-raspberry-gpio are what you need ?
Edit: add a new link
No luck yet.
I’m going to try wiping my micro SD card and reinstalling Manjaro Gnome on it again.
Hopefully, that will fix things.
I’ll let you know how it goes.