Go to advanced search

by chileflora
Tue Mar 19, 2019 11:25 pm
Forum: Python
Topic: SPI Problem between Mega 2560 and Raspberry Pi
Replies: 4
Views: 349

Re: SPI Problem between Mega 2560 and Raspberry Pi

... two boards connected through pin headers... The upper board is the pi zero board; in the upper part you can see the converter pins soldered. The SPI connection goes to thw lower board through a similar pin header (6 pins)...
by Brandon92
Tue Mar 19, 2019 11:17 pm
Forum: Python
Topic: SPI Problem between Mega 2560 and Raspberry Pi
Replies: 4
Views: 349

Re: SPI Problem between Mega 2560 and Raspberry Pi

My first thoughts.
How did you connect them, because the arduino works on 5v and the Rpi on 3.3v. And that is also the maximum input voltage of the Rpi.
(I didn't look at the code)
by chileflora
Tue Mar 19, 2019 9:25 pm
Forum: Python
Topic: SPI Problem between Mega 2560 and Raspberry Pi
Replies: 4
Views: 349

SPI Problem between Mega 2560 and Raspberry Pi

... developping an Autopilot Extension Module for FPV which consists of Raspberry Pi and Mega 2560. The communication between Pi and Mega is through SPI. Initially, I tested out the communications and it seemed to work fine, but now I am sitting for third day trying to solve the puzzle, which started ...
by ghp
Mon Mar 18, 2019 8:00 pm
Forum: Python
Topic: spi and max7219 issues with custom board
Replies: 2
Views: 477

Re: spi and max7219 issues with custom board

Hello, think that SPI interface is not perfectly useable for this special circuit. The 7219 clocks in data from Mosi at rising edge. In SPI mode 0 (transfer data on pos edge of SCK), the clock signal stays low after last transfer. ...
by SuperPiDummy
Mon Mar 18, 2019 6:33 pm
Forum: Python
Topic: Using I2C & SPI - Confusion!
Replies: 1
Views: 320

Re: Using I2C & SPI - Confusion!

Ignore me! I figured it out :D I'm guessing that you can't actively be reading from multiple inputs simultaneously as I was trying to do before? I've isolated the code a little bit so it's reading the sensor value as part of one step and then using that information to drive the pump... still some tw...
by SuperPiDummy
Mon Mar 18, 2019 2:56 pm
Forum: Python
Topic: Using I2C & SPI - Confusion!
Replies: 1
Views: 320

Using I2C & SPI - Confusion!

... B. nothing happens. I'm guessing it has to do with the fact that I'm trying to interface with the moisture sensor via I2C and then the relay via SPI? :? :? Code for the moisture sensor import time import busio import board import adafruit_ads1x15.ads1115 as ADS from adafruit_ads1x15.analog_in ...
by RattusRattus
Sun Mar 17, 2019 11:05 pm
Forum: Python
Topic: spi and max7219 issues with custom board
Replies: 2
Views: 477

Re: spi and max7219 issues with custom board

... Likewise I would much prefer NOT to use the Pi to supply the 5V to your module, this is a nasty dirty hack, but given that we are not gating the SPI bus to prevent power sequencing issues we'll ignore this for now as well. OK if this is not what you have already done then that should be enough ...
by olliecampbell
Tue Mar 12, 2019 7:45 am
Forum: Python
Topic: Python structure help
Replies: 4
Views: 501

Re: Python structure help

... You need to think about the sensor connections if you are running multi-processing - you cannot have two programs accessing the same bus (I2C, SPI etc) at the same time I think. Other bits like logging etc can create file locks that are pains to debug. Node-Red will do graphing and I’ve seen ...
by petermeigs
Mon Mar 11, 2019 7:57 pm
Forum: Python
Topic: GPIO.input voltage levels vs edge detection
Replies: 430
Views: 79292

Re: GPIO.input voltage levels vs edge detection

... resistor elsewhere will do the trick. I purchased level shifters similar to those you suggested and am trying these out on the MCP3008. It is an SPI device so there are 4 channels I need.
by crzmx
Mon Mar 11, 2019 7:31 pm
Forum: Python
Topic: spi and max7219 issues with custom board
Replies: 2
Views: 477

spi and max7219 issues with custom board

Hello, I need some help, i've been trying to use spi with python for the last couple days to get this to work. if anyone can help or give some suggestions on how i might be able to get this to work I have this custom board with a max7219 on it, the ...
by Andyroo
Mon Mar 11, 2019 7:25 pm
Forum: Python
Topic: Python structure help
Replies: 4
Views: 501

Re: Python structure help

... You need to think about the sensor connections if you are running multi-processing - you cannot have two programs accessing the same bus (I2C, SPI etc) at the same time I think. Other bits like logging etc can create file locks that are pains to debug. Node-Red will do graphing and I’ve seen ...
by smile2k
Wed Mar 06, 2019 9:44 am
Forum: Python
Topic: create .wav trough mcp3008
Replies: 0
Views: 139

create .wav trough mcp3008

... new to raspi and python and I have a project to be done for school... I have an microphone connected to channel 0 at the mcp3008 and then on the SPI of the raspi - Yes I have to do it in this way, not over USB - its a condition of the task. I get values from 500 - if it is quiete in the room ...
by bxdobs
Wed Mar 06, 2019 1:16 am
Forum: Python
Topic: PI - PYTHON -GPIO PIN MODE SCOPE Question
Replies: 1
Views: 380

PI - PYTHON -GPIO PIN MODE SCOPE Question

... in turn called some small Python snippets to do things like turn devices on or off, check status of any I/O, plus read temperature values via an SPI port ... reading from either the SPI and or Input PINS works great because the MODE of the Input GPIO Pins doesn't change when Python exits. However, ...
by klricks
Mon Mar 04, 2019 2:08 pm
Forum: Python
Topic: ImportError: No module named 'spi'
Replies: 4
Views: 2931

Re: ImportError: No module named 'spi'

One reason for the no module error is using the wrong interpreter. If your code is python 3 then you must use: python3 /path/your_script If your code is python 2 then you must use: python /path/your_script Also you should have the proper 'shebang' as first line of code. Or you installed the module t...
by mahjongg
Mon Mar 04, 2019 9:26 am
Forum: Python
Topic: ImportError: No module named 'spi'
Replies: 4
Views: 2931

Re: ImportError: No module named 'spi'

split off three posts from unrelated thread, changed subject
please don't hijack/re-open unrelated solved threads!
by B.Goode
Mon Mar 04, 2019 6:27 am
Forum: Python
Topic: ImportError: No module named 'spi'
Replies: 4
Views: 2931

Re: RFID Reader question

i've searched reinstalled spi and to the best of my knowledge my pi3b is setup correctly. any advice gladly received. The Python interpreter is the only judge that counts in this case. And the Python interpreter says that you have not ...
by drifterf
Mon Mar 04, 2019 6:05 am
Forum: Python
Topic: ImportError: No module named 'spi'
Replies: 4
Views: 2931

Re: RFID Reader question

have you enabled SPI in raspi-config ?
by hjnr
Sat Mar 02, 2019 7:12 pm
Forum: Python
Topic: ImportError: No module named 'spi'
Replies: 4
Views: 2931

ImportError: No module named 'spi'

... File "/home/pi/python-2019/card-read.py", line 2, in <module> import MFRC522 File "/home/pi/python-2019/MFRC522.py", line 5, in <module> import spi ImportError: No module named 'spi' i've searched reinstalled spi and to the best of my knowledge my pi3b is setup correctly. any advice gladly received.
by Andyroo
Wed Feb 27, 2019 4:25 pm
Forum: Python
Topic: Sudo and IDLE3
Replies: 2
Views: 390

Re: Sudo and IDLE3

Closest I have seen was with a SPI module that gave errors without SUDO.

In the end I had to add the module into THONNY and run the code from there. I could not get Idle out of the SUDO mode.
by jujupatel18
Sun Feb 24, 2019 10:14 pm
Forum: Python
Topic: Having trouble writing data in CSV file
Replies: 7
Views: 1022

Re: Having trouble writing data in CSV file

... however now I need to figure out way to combine the CSV into one file. See code below: # Importing modules import spidev # To communicate with SPI devices from numpy import interp # To scale values from time import sleep, strftime, time # import Adafruit_DHT # to add DHT sensor import time ...
by Andyroo
Sun Feb 24, 2019 9:33 pm
Forum: Python
Topic: Having trouble writing data in CSV file
Replies: 7
Views: 1022

Re: Having trouble writing data in CSV file

... when i run the script, no errors are returning. The file gets created but with no data. # Importing modules import spidev # To communicate with SPI devices from numpy import interp # To scale values from time import sleep, strftime, time # import Adafruit_DHT # to add DHT sensor import time ...
by jujupatel18
Sat Feb 23, 2019 9:04 pm
Forum: Python
Topic: Having trouble writing data in CSV file
Replies: 7
Views: 1022

Having trouble writing data in CSV file

... when i run the script, no errors are returning. The file gets created but with no data. # Importing modules import spidev # To communicate with SPI devices from numpy import interp # To scale values from time import sleep, strftime, time # import Adafruit_DHT # to add DHT sensor import time ...
by Unsigned Student
Wed Feb 20, 2019 6:33 am
Forum: Python
Topic: Issue with spidev using 2 devices
Replies: 4
Views: 443

Issue with spidev using 2 devices

... to address my new current problem. I'm a student and have gathered some experience with multiple programming languages in the past few years but SPI and everything directly related is quite new to me. My goal with my current project is it to use a raspberry pi to communicate with 2 BMS chips ...
by Unsigned Student
Mon Feb 18, 2019 11:46 am
Forum: Python
Topic: Problem with Piscope (pigpio) and spidev
Replies: 10
Views: 1182

Re: Problem with Piscope (pigpio) and spidev

Please note that pigpio works by sampling the GPIO, by default 200 thousand times per second. With that in mind you need to limit the SPI bit rate to a maximum of 100kbps when debugging with piscope/pigpio. If other GPIO are showing activity due to noise which is irrelevant but mucking up ...
by joan
Mon Feb 18, 2019 11:20 am
Forum: Python
Topic: Problem with Piscope (pigpio) and spidev
Replies: 10
Views: 1182

Re: Problem with Piscope (pigpio) and spidev

Please note that pigpio works by sampling the GPIO, by default 200 thousand times per second. With that in mind you need to limit the SPI bit rate to a maximum of 100kbps when debugging with piscope/pigpio. If other GPIO are showing activity due to noise which is irrelevant but mucking up ...

Go to advanced search