Page 1 of 1

Wiringpi2 Error

Unread postPosted: Wed May 16, 2018 10:33 pm
by Gerri3d
I tried a small test program which workes some weeks ago:

Code: Select all
#!/usr/bin/python
import wiringpi2 as wpi
import time
 
wpi.wiringPiSetup()
wpi.pinMode(27,1)
 
while True:
    wpi.digitalWrite(27, 1)
    time.sleep(4)
    wpi.digitalWrite(27, 0)
    time.sleep(4)



and it worked. But today I get this error(s):

odroid@odroid:~/WiringPi2-Python$ python led_exam.py
Traceback (most recent call last):
File "led_exam.py", line 2, in <module>
import wiringpi2 as wpi
File "/home/odroid/WiringPi2-Python/wiringpi2.py", line 28, in <module>
_wiringpi2 = swig_import_helper()
File "/home/odroid/WiringPi2-Python/wiringpi2.py", line 20, in swig_import_helper
import _wiringpi2
ImportError: No module named _wiringpi2
odroid@odroid:~/WiringPi2-Python$ python led_exam.py
Traceback (most recent call last):
File "led_exam.py", line 2, in <module>
import wiringpi2 as wpi
File "/home/odroid/WiringPi2-Python/wiringpi2.py", line 28, in <module>
_wiringpi2 = swig_import_helper()
File "/home/odroid/WiringPi2-Python/wiringpi2.py", line 20, in swig_import_helper
import _wiringpi2
ImportError: No module named _wiringpi2
odroid@odroid:~/WiringPi2-Python$


I am new in python (it is 3.5) and I need some help to find the problem.

Re: Wiringpi2 Error

Unread postPosted: Wed May 16, 2018 11:39 pm
by odroid
No module named _wiringpi2 means there is no wiringpi lib for python.
Did you follow this instruction to install the WiringPi?
https://wiki.odroid.com/odroid-xu4/appl ... o/wiringpi

Re: Wiringpi2 Error

Unread postPosted: Wed May 16, 2018 11:47 pm
by Gerri3d
yes I did. And it workes some days ago. How can I check that it is still there?

Re: Wiringpi2 Error

Unread postPosted: Thu May 17, 2018 12:17 am
by odroid
I have no idea what's wrong in your system.
Just follow the steps again since there will be no negative side effect.

Re: Wiringpi2 Error

Unread postPosted: Thu May 17, 2018 12:25 am
by Gerri3d
how can I uninstall everything now?

WHich folders should I use?

Re: Wiringpi2 Error

Unread postPosted: Thu May 17, 2018 12:58 am
by odroid
Do you remember where you downloaded wiringpi and wiringpi2-python source code?
If you can't remember, just start the instruction again.

Re: Wiringpi2 Error

Unread postPosted: Thu May 17, 2018 5:04 pm
by Gerri3d
I installed the wiringPi folder (C) at the root. Where sholud I install the Python wrapper now?
https://github.com/hardkernel/WiringPi2-Python

Re: Wiringpi2 Error

Unread postPosted: Thu May 17, 2018 10:58 pm
by odroid
You can run the git command in current directory "wiringPi".