i installed the python-pigpio library and get the error pigpio.error: ‘GPIO is not in use for PWM’ when running the line https://github.com/danking6/smart-led-window/blob/master/window.py#L133. google didn’t turn up much for that error, and am new to raspberry pi development. im not sure where to even start troubleshooting. i am only using pins 21 and the ground pin next to it. can someone point me in a good troubleshooting direction….
using python 2.7.16, python-pigpio 1.68-3
Have you tried moving your connection to pin GPIO 18? according to this image, pin 21 does not have PWM support
Related
I have been trying for a day to install Pandas_ta on my raspberry py with little succes. I first made a Python script on my PC and then placed it on my Raspberry pi, after installing some packages, the last one I had to so was Pandas_ta. I searched op documentary, I tried out some youtube video's. But it feels harder then it should. Does someone had a guide for me ?
I have a small problem with the python library of BLYNK: I need to set the properties of an appbutton with
blynk.set_property("G20", "offBackColor", "#000000")
It only works with
blynk.set_property("20", "offBackColor""#000000")
with a virtual pin. I followed some tutorials from github, pypi and their own tutorials but nothing worked.
I use Python3 and a raspberry pi 4
I am working on my first Raspberry Pi project while following a course for creating a line-following robot. This is the course. I followed all the instructions and connected the pins as it describes but when I run the code on the Raspberry Pi OS it throws an error:
gpiozero.exc.PinPWMUnsupported: PWM is not supported on pin GPIO7
This is the code:
from gpiozero import Robot
from time import sleep
my_robot = Robot(left=(7,8), right=(9,10))
my_robot.forward()
sleep(1)
my_robot.stop()
I tried to search for solutions and checked the official documentation but it hasn't been helpful. How can I fix this?
The likely reason for this error is that the user has installed gpiozero into a virtual environment without installing a pin library. gpiozero's built-in pin interface does not support PWM. You need to install RPi.GPIO to get the normal experience:
pip install gpiozero rpi-gpio
This is mentioned in the docs: https://gpiozero.readthedocs.io/en/stable/faq.html#why-do-i-get-pinfactoryfallback-warnings-when-i-import-gpiozero
I had the same problem with gpiozero's CamJamKitRobot and Robot classes when trying to run it in a pipenv (same issue may occur with a virtual env, but I have not tried). Running the script outside of the pipenv (therefore just using the system installed pip packages) resolved the issue for me.
After many checks, it resulted that the GPIO pins and the software were ok. The motors were connected to a L289N Driver Motor module, which wasn't getting enough power from the batteries and this was the cause of the error. In case someone has the same or similar hardware connections and faces this issue, check if the L289N module is powered on (it should turn on the red LED that's on the module).
I was following the guide on https://www.raspberrypi-spy.co.uk/2018/02/basic-servo-use-with-the-raspberry-pi/ with Micro Servo WS-SG90 and Raspberry Pi 3B+ and used the gpiozero Python library and ran into the same exception. In my case this was caused by running the program as non-root user. Running the program with sudo made the servo turn. The other alternative would be to use PiGPIOFactory with pigpiod which does not require to run the program with elevated privileges.
Odroid running Ubuntu Mate 16.04 and ROS Kinetic. I have wiringPi2 installed for accessing the GPIO pins. I am able to use the GPIO pins through a Python script, but they require sudo access. I have a ROS node (written in Python) in which I want to access the GPIO pin data and publish to a topic. But, I am not able to do so, because wiringPi2 required sudo access, and ROS is not defined in root.
I have tried using wiringPiSetupSys() function which does not require sudo access, but that does not work i.e. I am not able to get the GPIO pin data without sudo access.
All the solutions to similar problems for Raspberry Pi platform don't seem to work for Odroid.
Thanks
Unfortunately, I could not find a fix to the problem with the exact specifications mentioned. However, when I tested the same code on a Raspberry Pi 3 with Raspbian, it works correctly.
So, I have concluded that the issue lies in the OS used i.e. Ubuntu Mate 16.04.
So, a solution might be to use Raspbian on Odroid itself. I am yet to test whether that works out.
Update : Raspbian doesn't exist as such for Odroid, so some other work around might be required.
I have written a python code by using OpenCV library to detect a motion. If a motion occurs, it takes a snapshot of the moving object. However my problem is this: If I execute the program on my PC (Ubuntu 12.04) everything's OK.
But when I execute the program on my BeagleBone which has Angstrom Linux running and an Us Robotics webcam device attached to it, after a while it gives the following error:
libv4l2: error dequeuing buf: No such device
VIDIOC_DQBUF: No such device
How can I solve this problem?
Regards
edit: I installed ubuntu 12.04 to my BeagleBone and everything is OK with it too. It seems like my problem is related to Angstrom image. Maybe a driver or a library (libv4l2?) problem? Any ideas?
I was seeing this error with Ubuntu also when the board was powered through the USB cable. When I powered the board with a 5V supply, the problem went away.
I experienced the same problem. I even changed my board because of this error. But when I resorted back to my older power supply, it was gone. As simple as that.