Go to advanced search

by Pavel_47
Thu Jan 23, 2020 5:04 pm
Forum: Troubleshooting
Topic: Cannot upgrade RPi4
Replies: 36
Views: 523

Re: Cannot upgrade RPi4

... openssh-server openssh-sftp-server openssl pcmanfm pi-bluetooth piclone pipanel piwiz pixflat-icons python-cryptography python-piglow python-spidev python-werkzeug python2.7 python2.7-dev python2.7-minimal python3-cryptography python3-piglow python3-spidev python3-uno python3-werkzeug raspberrypi-bootloader ...
by DougieLawson
Fri Jan 17, 2020 10:57 am
Forum: Automation, sensing and robotics
Topic: MAX6675 thermocouple amp insists my kitchen in over 200C!
Replies: 2
Views: 140

Re: MAX6675 thermocouple amp insists my kitchen in over 200C!

6675s are junk compared to MAX31855s. Do you have a type-K thermocouple. #!/usr/bin/python3 # -*- coding: utf-8 -*- import spidev from time import sleep m6675 = spidev.SpiDev(1,1) m6675.max_speed_hz=1000000 def c_to_f(temp): f = ((temp/5)*9)+32 return f def readTempC(): m6675.writebytes([0x00,0x00]) ...
by mmmmat
Fri Jan 17, 2020 9:54 am
Forum: Automation, sensing and robotics
Topic: MAX6675 thermocouple amp insists my kitchen in over 200C!
Replies: 2
Views: 140

MAX6675 thermocouple amp insists my kitchen in over 200C!

... I know my way around python and it's hardly complicated anyway, but fwiw my test script is just this: #!/usr/bin/python import max6675 import spidev sensor = max6675.Max6675(0,0) print sensor.temperature Are these cheap eBay MAX6775 amps just total junk or have I missed something fundamental? ...
by bhjel
Mon Jan 13, 2020 12:19 am
Forum: Compute Module
Topic: Rare comms failure with enc28j60 and compute module "netdev watchdog: eth0 ("enc28j60"): transmit queue 0 timed out"
Replies: 9
Views: 2412

Re: Rare comms failure with enc28j60 and compute module "netdev watchdog: eth0 ("enc28j60"): transmit queue 0 timed out"

... +0.000003] Modules linked in: sha256_generic cfg80211 rfkill 8021q garp stp llc evdev snd_usb_audio enc28j60 snd_hwdep snd_usbmidi_lib snd_rawmidi spidev uvcvideo snd_seq_device raspberrypi_hwmon hwmon snd_bcm2835(C) snd_pcm bcm2835_v4l2(C) bcm2835_codec(C) snd_timer v4l2_mem2mem snd bcm2835_mmal_vchiq(C) ...
by ngdievr
Sun Jan 12, 2020 12:26 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: spidev buf size on Buster OS
Replies: 0
Views: 60

spidev buf size on Buster OS

Hi, on previous versions of raspbian (stretch is the latest i tried), i changed the kernel to support spidev module with larger chunk sizes (64kB). this was don by editing the spidev.c file in linux/drivers/spi/spidev.c as follow: static unsigned bufsiz = 65536; this used ...
by silix
Sat Jan 11, 2020 7:55 pm
Forum: Troubleshooting
Topic: No /dev/spidev* despite loaded modules [solved]
Replies: 11
Views: 4792

Re: No /dev/spidev* despite loaded modules [solved]

I had this problem and it was due to the 3.5" waveshare LCD . So I changed the active display to HDMI : cd LCD-show then I ran : sudo ./LCD-hdmi then in /boot/config.txt , I removed comment in front of line: dtparam=spi=on then two spi devices appeared in /dev/ folder and everything got OK p.s.: it ...
by Asymic
Sat Jan 11, 2020 8:25 am
Forum: Python
Topic: Oscilloscope
Replies: 10
Views: 759

Re: Oscilloscope

This is the final code, could be tidied up a little! #!/usr/bin/python import spidev import time from tkinter import Tk, Canvas, PhotoImage, mainloop WIDTH, HEIGHT = 500, 400 IP_channel = 1 x = 1 # Open SPI bus spi = spidev.SpiDev() spi.open(0,0) spi.max_speed_hz=1000000 ...
by nirm
Tue Jan 07, 2020 9:32 pm
Forum: Troubleshooting
Topic: Cannot enable SPI on Raspberry Pi Zero
Replies: 0
Views: 18

Cannot enable SPI on Raspberry Pi Zero

... = RaspberryPi() File "/home/pi/e-paper/e-Paper/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epdconfig.py", line 50, in __init__ self.SPI = spidev.SpiDev(0, 0) IOError: [Errno 2] No such file or directory Any help would be awesome.
by d3lo
Tue Jan 07, 2020 5:44 pm
Forum: General discussion
Topic: Setting up CAN on Raspberry PI
Replies: 0
Views: 110

Setting up CAN on Raspberry PI

... i could not get my can0 up. There's no net directory below: [email protected]:~ $ ls /sys/bus/spi/devices/spi0.0 driver modalias of_node power spidev statistics subsystem uevent [email protected]:~ $ ls /sys/bus/spi/devices/spi0.1 driver modalias of_node power spidev statistics subsystem uevent ...
by Kathy8751
Tue Jan 07, 2020 4:26 am
Forum: Beginners
Topic: Use an OLED screen (SSD 1306) in Raspberry B+
Replies: 0
Views: 67

Use an OLED screen (SSD 1306) in Raspberry B+

... = Adafruit_SSD1306.SSD1306_128_64(rst=RST) # 128x32 display with hardware SPI: # disp = Adafruit_SSD1306.SSD1306_128_32(rst=RST, dc=DC, spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE, max_speed_hz=8000000)) # 128x64 display with hardware SPI: disp = Adafruit_SSD1306.SSD1306_128_64(rst=RST, dc=DC, spi=SPI.SpiDev(SPI_PORT, ...
by nirm
Sun Jan 05, 2020 6:12 pm
Forum: Beginners
Topic: Cannot enable SPI on Raspberry Pi Zero
Replies: 0
Views: 44

Cannot enable SPI on Raspberry Pi Zero

... = RaspberryPi() File "/home/pi/e-paper/e-Paper/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epdconfig.py", line 50, in __init__ self.SPI = spidev.SpiDev(0, 0) IOError: [Errno 2] No such file or directory Any help would be awesome.
by JakeQuinn
Thu Jan 02, 2020 7:42 pm
Forum: Troubleshooting
Topic: MCP23S17 does not output the desired output
Replies: 1
Views: 81

MCP23S17 does not output the desired output

... bit and use some third party software that looks at the state of the GPIO pins. from RPiMCP23S17.MCP23S17 import MCP23S17 import time import spidev spi = spidev.SpiDev() spi.open(0,0) spi.max_speed_hz = 100000 #have to slow down the SPI bus so that i can look at the states in piscope mcp1 ...
by Joseph C.
Mon Dec 30, 2019 5:59 pm
Forum: Python
Topic: GPIO zero keeps giving "OutputDeviceBadValue"
Replies: 10
Views: 483

GPIO zero keeps giving "OutputDeviceBadValue"

... servo01.angle = newAngle sleep(servoDelay) # Hardware SPI configuration: SPI_PORT = 0 SPI_DEVICE = 0 mcp = Adafruit_MCP3008.MCP3008(spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE)) print('Reading MCP3008 values, press Ctrl-C to quit...') # Print nice channel column headers. print('| {0:>4} | {1:>4} ...
by Joseph C.
Mon Dec 30, 2019 4:59 pm
Forum: Python
Topic: Raspberry PI keeps giving Syntax Error when I see nothing wrong
Replies: 4
Views: 154

Raspberry PI keeps giving Syntax Error when I see nothing wrong

... servo01.angle = newAngle sleep(servoDelay) # Hardware SPI configuration: SPI_PORT = 0 SPI_DEVICE = 0 mcp = Adafruit_MCP3008.MCP3008(spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE)) print('Reading MCP3008 values, press Ctrl-C to quit...') # Print nice channel column headers. print('| {0:>4} | {1:>4} ...
by edo1
Tue Dec 24, 2019 6:22 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Inconsistent gpiochipX name
Replies: 2
Views: 215

Inconsistent gpiochipX name

I use HC595 chip as SPI GPIO expander for a while. I have spidev interface used to manage this chip. Now I'm trying to use kernel GPIO ifrastructure. It works ok, but gpiochip device name differs across RPi models: gpiochip3 on RPi3 and gpiochip3 on RPi3+ ...
by Tim_H
Sun Dec 22, 2019 6:09 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: WS2812b / NeoPixel over SPI not stable while PWM is
Replies: 0
Views: 132

WS2812b / NeoPixel over SPI not stable while PWM is

... core frequency, which can fluctuate. Verified SPI enabled: devices are available in /etc/devices Verified SPI working: https://github.com/rm-hull/spidev-test and input is same as output, so OK. Using an Raspberry Pi 3B+, same results with a Raspberry Pi 2B. Did not test with Pi 4B 4GB yet. Event ...
by Asymic
Thu Dec 19, 2019 7:16 pm
Forum: Python
Topic: Oscilloscope
Replies: 10
Views: 759

Re: Oscilloscope

... tried canvas delete all, but I think I need to clear the image on the canvas. Any ideas what I should write in this line? #!/usr/bin/python import spidev import time import matplotlib.pyplot as plt from drawnow import * from tkinter import Tk, Canvas, PhotoImage, mainloop WIDTH, HEIGHT = 500, 400 ...
by Asymic
Thu Dec 19, 2019 5:53 pm
Forum: Python
Topic: Oscilloscope
Replies: 10
Views: 759

Re: Oscilloscope

... forms of Basic for 40 years, yet with Python and especially Tkinter I just can not quite grasp it! Here is the code:- #!/usr/bin/python import spidev import time import matplotlib.pyplot as plt from drawnow import * from tkinter import Tk, Canvas, PhotoImage, mainloop WIDTH, HEIGHT = 500, 400 ...
by Asymic
Mon Dec 16, 2019 5:05 pm
Forum: Python
Topic: Oscilloscope
Replies: 10
Views: 759

Oscilloscope

... this quickly, but was really quite surprised at how slow this runs, about 1-2 readings per second. Here is the code:- #!/usr/bin/python import spidev import time import matplotlib.pyplot as plt from drawnow import * val = [ ] cnt = 0 plt.ion() # Open SPI bus spi = spidev.SpiDev() spi.open(0,0) ...
by Cheatek
Sat Dec 14, 2019 4:21 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Enabling multi SPI buses
Replies: 3
Views: 224

Enabling multi SPI buses

... CS pins. In /boot/overlays/readme i found that i can use dtoverlay=spi1-3cs, spi3-2cs, spi4-2cs ... But after i did it in boot/config i have no spidev files for spi3/4/5 in /dev. I have only 5 spidev files: spidev0.0, spidev0.1, spidev1.0, spidev1.1, spidev1.2 . My config file looks like that: ...
by slim_
Tue Dec 10, 2019 10:40 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Running LCD XPT2046 and MCP2515 at the same time
Replies: 1
Views: 196

Re: Running LCD XPT2046 and MCP2515 at the same time

It's working now, i changed dtoverlay to this:

dtoverlay=spi1-3cs,cs0_pin=16,cs1_pin=16,cs2_pin=16,cs0_spidev=off,cs1_spidev=off

I think because all the other CS pins are used by the LCD.
by hippy
Tue Dec 10, 2019 7:09 pm
Forum: Graphics programming
Topic: 3,5" LCD Display NOT used as a desktop...
Replies: 19
Views: 1070

Re: 3,5" LCD Display NOT used as a desktop...

... file for the frame to pick-up. It is easy enough to churn a virtual frame buffer out via SPI. I haven't used actual SPI because I couldn't get spidev to work, but did manage it with RPi.GPIO bit-banging pins to create the SPI stream to a similar LCD as the OP.
by slim_
Tue Dec 10, 2019 12:07 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Running LCD XPT2046 and MCP2515 at the same time
Replies: 1
Views: 196

Running LCD XPT2046 and MCP2515 at the same time

I'm trying to run LCD XPT2046 and CAN interface (MCP2515) at the same time. The LCD35-show works fine on its own, however when I enable the CAN in "/boot/config.txt" the LCD is blank after reboot and the CAN bus works fine. The MCP2515 is connected the to SPI1.2, the CS is on PIN 36 (BCM 16) and the...
by TheJanitor
Sun Dec 08, 2019 3:34 pm
Forum: Device Tree
Topic: ads7846 on spi1
Replies: 58
Views: 7945

Re: ads7846 on spi1

... config_hdmi_boost=7 hdmi_group=2 hdmi_mode=1 hdmi_mode=87 hdmi_drive=1 hdmi_cvt 800 480 60 6 0 0 0 dtdebug=1 dtoverlay=spi1-1cs,cs0_pin=16,cs0_spidev=off dtoverlay=ads7846-spi1,penirq=5,penirq_pull=2,speed=50000 dtparam=swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900 dmesg: ...
by mgag
Mon Dec 02, 2019 8:54 pm
Forum: Python
Topic: Using (py-spidev+RPi.GPIO) instead of bcm2835.h
Replies: 1
Views: 1116

Re: Using (py-spidev+RPi.GPIO) instead of bcm2835.h

... don't know if you figured this out or not, but I have a similar problem with another TI ADC, ADS8698. The issue I think is that when using Python spidev, the SCLK signal is not consistent, there is a clock stretch every 8 bits, and for the ADS8698 there is a SCLK duty cycle requirement of 40-60% ...

Go to advanced search