git remote set-url --add --push origin git://original/repo.git
git remote set-url --add --push origin git://another/repo.git
wiringPiSetup: Unable to open /dev/mem or /dev/gpiomem: Permission denied.
Aborting your program because if it can not access the GPIO
hardware then it most certianly won’t work
Try running with sudo?
sudo usermod -a -G gpio user_name
% change the owner and group respectively
sudo chown root.gpio /dev/gpiomem
sudo chmod g+rw /dev/gpiomem
sudo vim /etc/default/locale
Unable to find vcvarsall.bat
qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found. This application failed to start because no Qt platform plugin could be initialized.
Sometimes, I found some tutorials for some wordpress problem. And it often ask you to change your functions.php or other source code.
I used gpiozero and RPi.GPIO to control my 3D printer. However, the speed is quite slow. After some nervewracking thinking, I found it the python that cause the slow motion of those motors. Even I delete the time.sleep() line, it still run slowly. This give me no choice that I have to rewrite my control module into c code. After the rewriting, the problem finally solved.
In the c code, I choose wiringPi library to control the GPIO.
The numbering system of the gpiozero and RPi.GPIO with wiringPi is quite different. You should use
to get the number map of your Pi.
Next you should wrap your c code in python.
Create a file test.c
and a file setup.py
Once the coding is finished, you should build and install you code. I suggest you install this in a virtual environment.
sudo apt install python-virtualenv
python setup.py build
python setup.py install
A completed configuration can be installed by running this
git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime
Create a file named testRPiGPIO.py and import this file in your projects
import testRPiGPIO as GPIO