All Questions
65 questions
0
votes
0
answers
87
views
Reading from MT6816 magnetic encoder with SPI connection using Python on Raspberry Pi 4
I am totally new to the field, don't really know what I'm doing and in need of help. I'm trying to read an absolute angle using an MT6816 14-bit magnetic encoder via SPI connection using Python on ...
0
votes
0
answers
30
views
Problem when testing module DAC MCP4922 with Raspberry Pi
I'm encountering an issue while testing a custom-designed DAC module that utilizes an MCP4922 chip as its primary processor.
The vendor provided C language test code for ESP32-S3, but I intend to test ...
0
votes
1
answer
571
views
Connecting Two SPI LCD to raspberry pi GPIO pins
I am doing my NEA project right now and I have a problem using 2 TFT LCD. Here are more details about the LCD 2.8" LCD SPI, Driver: ili9341 with touch version 1.2, this a picture of it:
I have ...
0
votes
1
answer
1k
views
Failed to add edge detection - Raspberry Pi 4 GPIO
I am trying to run a LoRa receiver using python
from time import sleep
from SX127x.LoRa import *
from SX127x.board_config import BOARD
BOARD.setup()
class LoRaRcvCont(LoRa):
def __init__(self, ...
-1
votes
1
answer
86
views
Why My Spi Connection Is Not Getting started?
Hello Guys I Am New To Embedded & Rasberry PI. So In Order To Understand SPI Connection I Made An PI-PI SPI Setup PS. I am Using Two Rasbrry Pi Model 4 B with Raspi OS & i did the followings ...
-1
votes
2
answers
247
views
SPI clock is not switching on RPi
I need to use SPI for a project I'm working on with a Raspberry PI, but the little bit of test code I wrote doesn't seem to work.
#test program for spi
import spidev
import RPi.GPIO as GPIO
from time ...
1
vote
0
answers
156
views
SpiDev xfer not working when called from inside function
I have been working on integrating an absolute encoder using SPI (link to datasheet) into my project and have run into a problem with the SpiDev library for Python. When running the test script below,...
2
votes
2
answers
465
views
How to send data to a Pervasive eink display via Python?
I got a 5.8" eink display from Pervasive Displays and cannot get it to work, I feel that only a little bit is missing. After a lot of struggle I managed to run it via their sample C code, but the ...
0
votes
0
answers
96
views
Additional SPI bus raspberry pi 3b+
I'm trying to read 2 devices from SPI bus nRF24 module and MAX31865. I read the MAX module constantly every second and need to read the nRF24 module from time to time in other binary, but when I just ...
1
vote
1
answer
703
views
How to enable SPI and access RFID RC522 Chip on Alpine Linux
I've set up Alpine on a Raspberry Pi 3B in diskless mode and it runs exceptionally smooth. I've managed to address GPIO pins (e.g. to read from temperature sensors) without much effort.
Now I'm trying ...
0
votes
0
answers
134
views
Using RFID-RC522 with spi on RBpi 3B+
Hello_friends,
I am trying to get a RFID reader working on a Raspberry 3b+
That same setup and codebase used to work well on the older 3b+ model from 2015 (the current one is 2017 edition), but now ...
5
votes
1
answer
433
views
raspberry pi 4 using SPI 4 & 5 at the same time causes kernel oops and crashes the whole system
intro
i want to use multiple SPI busses at the same time.
but when i use to use SPI 4 and SPI 5 at the same time it crashes the whole system
it doesn't crash instantly sometimes it takes 10 seconds ...
1
vote
0
answers
188
views
SpiDev read from BMM150 Geomagnetic Sensor
I am completely new to this topic so please excuse my mistakes.
I have this: https://www.mikroe.com/geomagnetic-click geomagnetic click with a BMM150 sensor with this datasheet: https://download....
2
votes
1
answer
438
views
Reassign GPIO pins for SPI (swap MOSI with SCK)
I had an adapter board made for a Raspberry Pi 4B and I somehow swapped the SPI clock and data lines on the board. Rather than redrawing and waiting for new adapter boards, is there a way to reassign ...
3
votes
2
answers
1k
views
Connecting RC522 RFID module to Raspberry Pi 4
I connect my RC522 RFID module to my Raspberry Pi 4 according to https://pimylifeup.com/raspberry-pi-rfid-rc522/ so we have Write.py and Read.py:
Write.py:
#!/usr/bin/env python
import RPi.GPIO as ...
0
votes
1
answer
347
views
Rx buffer overwrites Tx buffer in spidev xfer2
Coming here from electronics SE as it was suggested that I post here on this issue. The electronics SE post is here.
I'm setting up a comms link between an STM32F407 MCU and the Pi3B+. The Pi is ...
0
votes
1
answer
846
views
python spidev setting bits_per_word throws an error
so i need to set the bits per word to other than the deafult (which i think is 8)
import spidev
spi = spidev.SpiDev()
spi.open(0,1)
spi.bits_per_word = 8
This compiles no problem but when i set it ...
1
vote
1
answer
2k
views
RPi DMA transfer over SPI
I have an application where I want to write to an external DAC and read from an external ADC using the pi's SPI interface continuously.
The data to the DAC could come from some arbitrary function, and ...
0
votes
1
answer
2k
views
how to use MCP23S17 pin expander via SPI
I'm working on a custom sensor that is wired to a couple of MCP23S17 gpio expanders, which are in term connected to a Raspberry Pi 4 via the SPI pins i.e. SPI_MOSI, SPI_MISO, SPI_SCLK and CE0 pin.
I'm ...
0
votes
1
answer
1k
views
Raspberry Pi 4 Spidev Problems with NRF24L01 (AttributeError: module 'spidev' has no attribute 'spiDev')
I am new to the Raspberry Pi platform and I have been trying to get my Pi to communicate with an NRF24L01 module. I have been at this for a few days and just cannot get it to work. Here is my info and ...
1
vote
1
answer
411
views
PI Zero SPI info needed for Python
I'm trying to program the SPI in Python but the documentation is terrible. SPI Docs
I found some sites that show how to get started but I need to know how to change modes, set clock polarity, and set ...
0
votes
0
answers
609
views
How can Rpi python read SPI ADNS3080 Optical Mouse Sensor's register values?
I am using ADNS3080 optical flow in raspberry pi 3. I set SPI connection between raspberry and ADNS3080 optical flow. I used spidev library for reading values in python. I want to read delta_x and ...
2
votes
1
answer
210
views
How should I connect ten "MFRC522-based RFID" readers using SPI to the Pi Zero W?
Using the MFRC522.py library and SimpleMFRC522 extension, I have been able to pass tag ID information as well as the text block; but only for one tag at a time.
Diving deeper into the MFRC522 ...
1
vote
0
answers
211
views
raspberry pi 3 spi issue
I connected MOSI to MISO on Raspberry PI 3
Executed the below code:
import time
import sys
import spidev
spi = spidev.SpiDev()
spi.open(0,0)
print(spi.bits_per_word)
print(spi.mode)
print(spi....
1
vote
1
answer
16k
views
How to connect ST7789 LCD to Raspberry Pi
I'm trying to connect to this LCD ( sry 4 japanese page:( use translate plz )
This monitor driver is ST7789, 7pins.[GND VCC SCL SDA RES DC BLK] And now I'm connecting to pi like this https://i....
0
votes
1
answer
413
views
spidev sanity check not working
ArchARM on Raspberry Pi 3, spidev installed from AUR.
I'm trying to control a Waveshare device via SPI, and can't get SPI to work from Python.
The most basic sanity test I can think of is failing:
...
1
vote
1
answer
583
views
Speed up SPI transfer
So I need to transfer a byte on the spi interface on raspberry pi. Here's my code in python
import spidev
import time
import binimp
fhandle=open("white.txt")
initial=binimp.extract(fhandle,'192','...
2
votes
1
answer
5k
views
I am using a RFID reader module MFRC522 with my raspberry pi but it is not working with python 3
I am using RFID reader module (MFRC522) with my raspberry pi and when I run the script with python 2 it works fine and reads the RFID tag but when I run it with python3 I get an error - No Module ...
0
votes
0
answers
185
views
piscope SPI pin activity even though the SPI device is not connected
my final goal is to use python (spidev) to communicate with a BMS chip. Until now I was quite unsuccessful, thats why I wanted to use piscope to track the activity of the SPI pins.
The device is not ...
2
votes
2
answers
723
views
SPI xfer2 callback possible?
I would like to control 10 different devices with SPI. As there is not enough ChipSelect outputs I use GPIO to toggle a MUX on the clock. Problem is I have to wait until the SPI is done transmitting ...
2
votes
1
answer
875
views
SPI only returning zeros with Raspbian (It works with IoT core) [closed]
I am using this ADC connected to the channel 0 of my Pi3 board for reading values from a sensor. In IoT core, I was using a very simple code for testing the my device, and it worked fine. The C# code ...
1
vote
2
answers
692
views
Can't blink a LED using SPI interface on Raspberry Pi v3
As a part of my PoC project, I'm using single 5050 LED made by Adafruit. I wired it like this (LED - RPi):
DI (Data Input) - SPI0 MOSI
CI (Clock Input) - SPI0 SCLK
GND (Ground) - GND
VCC (5V) - 5V ...
0
votes
1
answer
843
views
pigpio spi : use an other GPIO for chip select
I'm using the Waveshare High-Precision AD/DA Board, and they not use the default chip select pin of RPi (GPIO# 7, 8) for SPI.
Using the pigpio python library, I want to know how to change the chip ...
1
vote
0
answers
298
views
Simultaneous sampling using ADC and displaying in graphical LCD
I am using Raspberry Pi 3 Model B and MCP3008 for sampling my analog signal and the sampling frequeny is approximately 10 kHz. I need to display the sampled values in 3.5' inch graphical LCD. I just ...
1
vote
1
answer
1k
views
ADXL345 Accelerometer attached to Raspberry Pi - Problems with Sample Rate
I have an ADXL345 Accelerometer attached via SPI pins to my Raspberry Pi. I use the following Python script to collect data:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys, math, os, spidev, ...
0
votes
3
answers
7k
views
Using Python's Rpi.GPIO library to manually toggle SPI chip select. Is this OK?
I recently designed a PCB that features several SPI devices. One of the devices is the Microchip MCP23S17 GPIO expander (http://ww1.microchip.com/downloads/en/DeviceDoc/20001952C.pdf). I have the ...
0
votes
1
answer
953
views
Use RFID reader AND a 4x4 matrix keypad with breadboard
I am trying to set up a pi to use rfid to scan a card and if the card is correct, the user will enter in a 4 digit code into a 4x4 matrix keypad. Each device works perfectly fine independently however ...
1
vote
1
answer
871
views
Compute Module 3 + PIGPIO SPI, Clock signal but no data
So I'm trying to write to as spi eeprom using the pigpio library, but I have the problem of only the clock line going active, none of the data or select lines.
I'm debugging the signals with the ...
1
vote
0
answers
2k
views
How does one use the SPIDev xfer command?
I can't figure out what the input/output of the SPIDev xfer command is supposed to be. I know it accepts an array of integers but what does it mean? I initially thought it meant the byte array of an ...
1
vote
3
answers
2k
views
Possible SPI issues around NRF24 operations post RPi system update?
I have a number of RPis that communicate with Arduinos via BLavery's lib_nrf24.py (which appears to be derived from Barraca's pynrf24). Recently several of the RPis automatically updated via apt-get ...
1
vote
1
answer
817
views
SPI Communication with ADS7851
I'm currently trying to communicatie Raspberry Pi 2 B+ with ADS7851, an adc chip made from TI.
ADS7851_DATASHEET
I've done pretty much of research, but I'm still stuck on how to communicate in SPI ...
-1
votes
1
answer
5k
views
Reading all channels MCP3008
I have a problem with reading data from adc convertor MCP3008 10bit.
I found a python script from adafruit that give data value from all channels
(CHO TO CH7). I added a picture with my results and ...
0
votes
1
answer
584
views
Values of read SPI data in a loop change if printing the value
I'm trying to read in values from an Arduino. It's sending the data properly (checked with another Arduino), but the Pi doesn't seem to be getting it properly. I've created a function to read in a ...
1
vote
2
answers
10k
views
Using a MAX6675 with Raspberry Pi 3
I have played with the raspberry pi 3 for a short while now. I bought a MAX6675 Chip to read the temperature on a supported k-type thermocouple. I have tried time and time again over the past three ...
4
votes
1
answer
2k
views
Trouble using spidev after RPi.GPIO
I'm using a Pi 3B to interface with an SPI device. My program is written in Python 2, the Pi is the SPI master and the external device is the slave. I am using both the spidev module and the RPi.GPIO ...
0
votes
3
answers
1k
views
How to use RC522 RFID on spidev1.x on Raspberry Pi 3
I followed this https://raspberrypi.stackexchange.com/a/56513/57412 trying to use my RC522 on spi 1.0 but I'm stuck.
Could someone give me a hand wiring correctly (I hope it is) and how to use the ...
1
vote
1
answer
4k
views
Block read py-spidev using xfer or xfer2
I wrote some Python to read data from an SPI A/D converter MCP3208 using:
dat = spi.xfer([0x06, 0x00, 0x00])
for the first channel. The variable dat contains the data which I need to shift and ...
1
vote
0
answers
386
views
Using three SPI channels with wiring pi?
I was wondering if there is a way to use three different channels for SPI through the wiring pi library. I mean I know that a chip/slave/channel select pin can be any pin capable of sending a high or ...
4
votes
1
answer
11k
views
Control seconds SPI interface with SpiDev
Is there any option to control the second SPI interface of Raspberry Pi 2 B with SpiDev?
http://pinout.xyz/pinout/spi
Pin 19, 21, 23 are SPI0 and Pin 35, 38, 40 are SPI1.
SPI0 works perfect, but if ...
1
vote
0
answers
4k
views
RFID RC522 Stops reading data after reading data continuously
I'm trying to make RFID RC522 work with my Raspberry Pi 3 B+.
I use the library MFRC522, and the the sensor can read data most of the times. However if I just put the card on the sensor it will stop ...