This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GPIO stopped working
#1
I'm sure it's something i've done, but i'm not sure what that can be, so i would like advice to diagnose what could be wrong.

Using MacArthuir hat, I have a 1W temp sensor conneccted to it's 1W connection, and I also have an RF receiver connected to GPIO 27. Everything has been working perfectly fine for weeks, but suddenly, the RF receiver stopped working, and I also noticed the 1W temp sensor was in red. 

I tried to remove the sensor, from the GPIO add, but now is not recognized. When I click on "refresh" i get the message  "", which seems weird, but i also get this same message (doesn't appear as an error) on the startup checks:

Code:
Checking touchscreen optimization... | enabled
Checking virtual keyboard... | keyboard-EN.xml
Checking backlight... | enabled | Value (0-100): 50
Checking Power off management... | enabled
Checking Shutdown management... | enabled
Checking OpenPlotter autostart... | enabled
Checking rescue mode... | disabled
Checking debugging mode... | disabled
Checking system log file size... | System log file size: 1.58 MB
Checking OpenPlotter packages source... | added
Checking Notifications... | running | Access to Signal K server validated
Checking GPIO... | pigpiod running | openplotter-gpio-read running | Seatalk1 disabled | 1W enabled | pulses enabled | digital disabled | Access to Signal K server validated
Checking I2C sensors... | openplotter-i2c-read running | I2C enabled | Access to Signal K server validated
Checking pypilot... | pypilot running | pypilot_web running | Access to Signal K server validated | pypilot_hat not running
Checking Network... | NTP server running | correct access point password
Checking serial connections alias... | All your serial connections have an assigned alias
Checking Dashboards... | Grafana running | Influxdb running | Telegraf running | Kip enabled | Node-Red enabled
Checking OpenCPN... | running |  | FP autostart disabled | FP touchscreen enabled
Checking Signal K server... | running
Checking serial connections conflicts... | no conflicts
Checking network connections conflicts... | no conflicts
Checking GPIO conflicts... | no conflicts
CHECK SYSTEM FINISHED


Oddly enough, the openplotter-gpio-read error only dissapears if I create a digital/pulse entry. I tried to add a counter to GPIO 27 and it worked without issues. But still, if I disconnect it and connect the RF receiver, it doesn't work anymore.
Thios is my "rf testing" python code which has worked for weeks:

Code:
#!/usr/bin/env python3

import argparse
import signal
import sys
import time
import logging

from rpi_rf import RFDevice

rfdevice = None

# pylint: disable=unused-argument
def exithandler(signal, frame):
    rfdevice.cleanup()
    sys.exit(0)

logging.basicConfig(level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S',
                    format='%(asctime)-15s - [%(levelname)s] %(module)s: %(message)s', )

parser = argparse.ArgumentParser(description='Receives a decimal code via a 433/315MHz GPIO device')
parser.add_argument('-g', dest='gpio', type=int, default=27,
                    help="GPIO pin (Default: 27)")
args = parser.parse_args()

signal.signal(signal.SIGINT, exithandler)
rfdevice = RFDevice(args.gpio)

rfdevice.enable_rx()
timestamp = None
logging.info("Listening for codes on GPIO " + str(args.gpio))
while True:
    if rfdevice.rx_code_timestamp != timestamp:
        timestamp = rfdevice.rx_code_timestamp
        if rfdevice.rx_code == 2794600:
            print("Button 1")
        logging.info(str(rfdevice.rx_code) +
                     " [pulselength " + str(rfdevice.rx_pulselength) +
                     ", protocol " + str(rfdevice.rx_proto) + "]")
    time.sleep(0.01)
rfdevice.cleanup()

The only pontentially bad thing I could have done is updating all the software suggested by the raspberry directly, without using OpenPlotter Settings app. Could that be the cause?

Or in any case, how can I diagnose what can be wrong?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)