hondagx35 wrote:Hi rikardo1979,
rikardo1979 wrote:If you feel up to maybe we can try make that OLED screen ?
Try this:
- set a softlink to python2
- Code: Select all
ln -s /usr/bin/python2 /usr/bin/python
- install RPIO.gpio
- Code: Select all
wget https://pypi.python.org/packages/source/R/RPi.GPIO/RPi.GPIO-0.6.2.tar.gz
tar zxvf RPi.GPIO-0.6.2.tar.gz
cd cd RPi.GPIO-0.6.2
python setup.py install
- get the python script and uncompress it
- Code: Select all
tar zxvf 16x2_oled_runeaudio.tar.gz
- copy this file
- Code: Select all
cp 16x2_oled_runeaudio.py /usr/local/bin/
- start the script
- Code: Select all
python /usr/local/bin/16x2_oled_runeaudio.py
- report
Frank
Trying
1st, you have a glitch in your code
- Code: Select all
wget https://pypi.python.org/packages/source/R/RPi.GPIO/RPi.GPIO-0.6.2.tar.gz
tar zxvf RPi.GPIO-0.6.2.tar.gz
[b]cd cd RPi.GPIO-0.6.2[/b]
python setup.py install
should be
- Code: Select all
wget https://pypi.python.org/packages/source/R/RPi.GPIO/RPi.GPIO-0.6.2.tar.gz
tar zxvf RPi.GPIO-0.6.2.tar.gz
[b]cd RPi.GPIO-0.6.2[/b]
python setup.py install
than I had
- Code: Select all
[root@runeaudio /]# cd RPi.GPIO-0.6.2
[root@runeaudio RPi.GPIO-0.6.2]# python setup.py install
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/RPi
copying RPi/__init__.py -> build/lib.linux-armv7l-2.7/RPi
creating build/lib.linux-armv7l-2.7/RPi/GPIO
copying RPi/GPIO/__init__.py -> build/lib.linux-armv7l-2.7/RPi/GPIO
running build_ext
building 'RPi._GPIO' extension
creating build/temp.linux-armv7l-2.7
creating build/temp.linux-armv7l-2.7/source
gcc -pthread -fno-strict-aliasing -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC -I/usr/include/python2.7 -c source/py_gpio.c -o build/temp.linux-armv7l-2.7/source/py_gpio.o
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1
So I did
- Code: Select all
[root@runeaudio RPi.GPIO-0.6.2]# pacman -S gcc
resolving dependencies...
looking for conflicting packages...
Packages (5) binutils-2.26-3 gcc-libs-5.3.0-5 glibc-2.23-1
linux-api-headers-4.4.1-1 gcc-5.3.0-5
Total Download Size: 42.02 MiB
Total Installed Size: 180.40 MiB
Net Upgrade Size: 117.54 MiB
:: Proceed with installation? [Y/n] y
:: Retrieving packages ...
linux-api-headers-4... 765.8 KiB 3.74M/s 00:00 [######################] 100%
glibc-2.23-1-armv7h 7.8 MiB 8.91M/s 00:01 [######################] 100%
gcc-libs-5.3.0-5-armv7h 8.7 MiB 6.64M/s 00:01 [######################] 100%
binutils-2.26-3-armv7h 4.1 MiB 8.83M/s 00:00 [######################] 100%
gcc-5.3.0-5-armv7h 20.8 MiB 8.54M/s 00:02 [######################] 100%
(5/5) checking keys in keyring [######################] 100%
(5/5) checking package integrity [######################] 100%
(5/5) loading package files [######################] 100%
(5/5) checking for file conflicts [######################] 100%
(5/5) checking available disk space [######################] 100%
(1/5) upgrading linux-api-headers [######################] 100%
(2/5) upgrading glibc [######################] 100%
warning: /etc/locale.gen installed as /etc/locale.gen.pacnew
Generating locales...
de_DE.UTF-8... done
Generation complete.
(3/5) upgrading gcc-libs [######################] 100%
(4/5) upgrading binutils [######################] 100%
(5/5) installing gcc [######################] 100%
It seems that it worked
- Code: Select all
[root@runeaudio RPi.GPIO-0.6.2]# python setup.py install
running install
running build
running build_py
running build_ext
building 'RPi._GPIO' extension
gcc -pthread -fno-strict-aliasing -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC -I/usr/include/python2.7 -c source/py_gpio.c -o build/temp.linux-armv7l-2.7/source/py_gpio.o
gcc -pthread -fno-strict-aliasing -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC -I/usr/include/python2.7 -c source/c_gpio.c -o build/temp.linux-armv7l-2.7/source/c_gpio.o
gcc -pthread -fno-strict-aliasing -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC -I/usr/include/python2.7 -c source/cpuinfo.c -o build/temp.linux-armv7l-2.7/source/cpuinfo.o
gcc -pthread -fno-strict-aliasing -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC -I/usr/include/python2.7 -c source/event_gpio.c -o build/temp.linux-armv7l-2.7/source/event_gpio.o
gcc -pthread -fno-strict-aliasing -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC -I/usr/include/python2.7 -c source/soft_pwm.c -o build/temp.linux-armv7l-2.7/source/soft_pwm.o
gcc -pthread -fno-strict-aliasing -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC -I/usr/include/python2.7 -c source/py_pwm.c -o build/temp.linux-armv7l-2.7/source/py_pwm.o
gcc -pthread -fno-strict-aliasing -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC -I/usr/include/python2.7 -c source/common.c -o build/temp.linux-armv7l-2.7/source/common.o
gcc -pthread -fno-strict-aliasing -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC -I/usr/include/python2.7 -c source/constants.c -o build/temp.linux-armv7l-2.7/source/constants.o
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro build/temp.linux-armv7l-2.7/source/py_gpio.o build/temp.linux-armv7l-2.7/source/c_gpio.o build/temp.linux-armv7l-2.7/source/cpuinfo.o build/temp.linux-armv7l-2.7/source/event_gpio.o build/temp.linux-armv7l-2.7/source/soft_pwm.o build/temp.linux-armv7l-2.7/source/py_pwm.o build/temp.linux-armv7l-2.7/source/common.o build/temp.linux-armv7l-2.7/source/constants.o -L/usr/lib -lpython2.7 -o build/lib.linux-armv7l-2.7/RPi/_GPIO.so
running install_lib
creating /usr/lib/python2.7/site-packages/RPi
copying build/lib.linux-armv7l-2.7/RPi/__init__.py -> /usr/lib/python2.7/site-packages/RPi
copying build/lib.linux-armv7l-2.7/RPi/_GPIO.so -> /usr/lib/python2.7/site-packages/RPi
creating /usr/lib/python2.7/site-packages/RPi/GPIO
copying build/lib.linux-armv7l-2.7/RPi/GPIO/__init__.py -> /usr/lib/python2.7/site-packages/RPi/GPIO
byte-compiling /usr/lib/python2.7/site-packages/RPi/__init__.py to __init__.pyc
byte-compiling /usr/lib/python2.7/site-packages/RPi/GPIO/__init__.py to __init__.pyc
running install_egg_info
Writing /usr/lib/python2.7/site-packages/RPi.GPIO-0.6.2-py2.7.egg-info
Than I managed to download move and install py but when I tried to run it I get
- Code: Select all
[root@runeaudio /]# python /usr/local/bin/16x2_oled_runeaudio.py
/usr/local/bin/16x2_oled_runeaudio.py:73: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
GPIO.setup(LCD_D7, GPIO.OUT) # DB7
_
And nothing else...seems like the process hangs and the display did not react at all
After few minutes I realised its stuck so I have tried to terminate the proces CTR+C. And tried reboot cmd. But did not work. Even the power button reboot did not work. So I had to cut the power off.
Butt back and rerun the py script but its stuck again at same. But this time the screen shows a little dot
nice
even I have no idea what that means
So forced power off again, reboot. Screen is black, rerun py and ...this time I have seen a short line bottom left corner flash for split of the second...screen is black cm is stuck same as before...
Will test more this evening when Im back from work