Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: autostart oled display failure..
#7
Pi3B-Kali-Piano_Dac..Moode 6.4 ...2 x Oled screens i2c connected paralleled but with different addresses...the larger oled runs Adrians code and starts at boot...
https://github.com/antiprism/mpd_oled/bl...L_MOODE.md

The smaller oled runs the code from here...and is the one that I cannot configure to start on boot..
https://www.youtube.com/watch?v=94ZjxjmhBrY

In addition the Pi is running Kents  script for the Flirc V1.1
http://moodeaudio.org/forum/showthread.php?tid=1529

I think that covers the hardware detail...as you can see from the attached image all is working as expected excepting that the smaller oled fails to start at boot no matter what I try.

If I tried to start it from an ssh session using..  (Same result using the absolute path.) (or using sudo..)
Code:
python ~/Adafruit_Python_SSD1306/raspberry-oled-monitor/monitor.py

It did nothing...If I cd to..~/Adafruit_Python_SSD1306/raspberry-oled-monitor/ and run 
Code:
python monitor.py


it starts...

so adding to /etc/rc/local  does not work and using a script to cd and then run and adding the script to /etc/rc/local also does not work..
However, making a launcher script in ~/Adafruit_Python_SSD1306/raspberry-oled-monitor/ 
as shown here does work so that from a ssh session I can run..
https://www.instructables.com/id/Raspberry-Pi-Launch-Python-script-on-startup/

Code:
~/Adafruit_Python_SSD1306/raspberry-oled-monitor/launcher.sh &

What I need is some way to run that at boot...??

Here is the shell script...

Code:
#!/bin/sh
# launcher.sh
# navigate to home directory, then to this directory, then execute python script

cd /
cd ~/Adafruit_Python_SSD1306/raspberry-oled-monitor
python monitor.py

and the first few lines of monitor.py..
Code:
# Copyright (c) 2017 Adafruit Industries
# Author: Tony DiCola & James DeVito
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
import time

import Adafruit_GPIO.SPI as SPIlauncher.sh
import Adafruit_SSD1306

from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont

import subprocess

# Raspberry Pi pin configuration:
RST = None     # on the PiOLED this pin isnt used
# Note the following are only used with SPI:
DC = 23
SPI_PORT = 0
SPI_DEVICE = 0

# Beaglebone Black pin configuration:
# RST = 'P9_12'
# Note the following are only used with SPI:
# DC = 'P9_15'
# SPI_PORT = 1
# SPI_DEVICE = 0

both launcher.sh and monitor.py have chmod +x applied.

as you will note I understand little about coding but apply the 'monkey see monkey do' approach... Blush 
I'm sure there is a simple answer and I am making a silly error but having followed numerous guides for numerous methods each one fails...

As I noted, no matter what I try, from a cold boot the small oled remains blank...from a reboot where it is already working it freezes and then shows the last data screen and does not update.

(@Kent...yes, added before exit 0 line... I'm a bear of little brain but not that little...Wink
https://www.goodreads.com/quotes/142015-...-brain-and


Attached Files Thumbnail(s)
       
----------
bob
Reply


Messages In This Thread
autostart oled display failure.. - by DRONE7 - 12-27-2019, 11:54 PM
RE: autostart oled display failure.. - by DRONE7 - 12-28-2019, 03:20 AM
RE: autostart oled display failure.. - by vinnn - 12-28-2019, 11:47 AM
RE: autostart oled display failure.. - by DRONE7 - 12-28-2019, 04:57 PM
RE: autostart oled display failure.. - by DRONE7 - 12-30-2019, 03:59 AM
RE: autostart oled display failure.. - by vinnn - 12-30-2019, 06:10 AM
RE: autostart oled display failure.. - by DRONE7 - 12-30-2019, 06:56 AM
RE: autostart oled display failure.. - by vinnn - 12-30-2019, 08:03 AM
RE: autostart oled display failure.. - by DRONE7 - 12-30-2019, 08:26 AM
RE: autostart oled display failure.. - by DRONE7 - 12-30-2019, 08:57 AM
RE: autostart oled display failure.. - by vinnn - 12-30-2019, 09:39 AM
RE: autostart oled display failure.. - by DRONE7 - 12-30-2019, 10:02 AM
RE: autostart oled display failure.. - by vinnn - 12-30-2019, 10:30 AM
RE: autostart oled display failure.. - by DRONE7 - 12-30-2019, 10:44 AM
RE: autostart oled display failure.. - by vinnn - 12-30-2019, 10:53 AM
RE: autostart oled display failure.. - by DRONE7 - 12-30-2019, 08:11 PM
RE: autostart oled display failure.. - by DRONE7 - 12-31-2019, 03:24 AM

Forum Jump: