• New predicta.py code

    From paulie420@1337:3/129 to All on Sun Sep 6 14:01:38 2020
    This is what I've come up with for now, even tho it calls the older GPIO pin python version:

    -----
    #!/usr/bin/python

    import RPi.GPIO as GPIO
    import time
    import os
    import random

    buttonPin = 21

    directory = "/home/pi/Videos/"
    GPIO.setmode(GPIO.BCM)
    GPIO.setup(buttonPin, GPIO.IN)

    def playEpisode():
    episode = random.choice(os.listdir(directory))
    os.system('clear') cmd = "nohup omxplayer --aspect-mode stretch "+"'"+directory+episode+"' &"
    print('Playing:')
    print(episode)
    os.system('killall omxplayer.bin')
    os.system(cmd)

    try:

    GPIO.wait_for_edge(buttonPin, GPIO.FALLING)
    playEpisode()

    #point to location of this file
    os.system('sudo python/home/pi/predicta.py')

    except KeyboardInterrupt:
    GPIO.cleanup()
    -----

    This version lets me press the button while a video is playing to get the
    next random video....

    However now I have more I want to add. I want the code to just automatcally start playing random video after random video, and only play a different one when I press a button. (You don't want to HAVE to press the button all the time...)

    I think I'll be able to do that by just writing a while loop that plays
    random videos, unless (else) a button press, then it plays a new one...

    Oh, the joys of python. And I'm so green...



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A45 2020/02/18 (Raspberry Pi/32)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (1337:3/129)
  • From Bob Roberts@1337:3/135 to paulie420 on Sat Oct 24 13:08:26 2020
    Re: New predicta.py code
    By: paulie420 to All on Sun Sep 06 2020 02:01 pm

    However now I have more I want to add. I want the code to just automatcally start playing random video after random video, and only play a different one when I press a button. (You don't want to HAVE to press the button all the time...)

    Hi Paulie,

    Any updates on your project? Would love to see a video on youtube or something of the finished project working. It sounds pretty neat.

    |08~|05B|03ob|08:|06R|03ob|08~
    |07



    ... The truth is NOT always dressed for the evening.
    --- SBBSecho 3.11-Linux
    * Origin: Halls of Valhalla <> San Francisco <> hovalbbs.com (1337:3/135)
  • From paulie420@1337:3/129 to Bob Roberts on Sun Oct 25 11:10:12 2020
    Hi Paulie,
    Any updates on your project? Would love to see a video on youtube or somethingof the finished project working. It sounds pretty neat.

    ~Bob:Rob~

    Hey BobRob;

    Yea, version 1.0 is done... as I posted here, I think, this version is good.. but I need help with the Python to make it better.

    This version you have to press the button, get a video. Press again, another random video. Thats it...

    I want to first add in that random videos begin playing on first run, and goto another IF theres a button press.
    I'd like to add in playing a commercial every 3rd video, to make it seem more like regular television.
    I'd like to display a Philco logo during the boot process, instead of the linuxy system stuff... I have a high quality SVG.
    I'd like to add in a 'screensaver' if no button presses after 5 videos or so; switches to using 'fbi' to display images - as a screensaver.

    Anyway, I installed the pi zero and button inside the TV; and it works great. Its a capacitive touch button, so I didn't have to modify the Predicta at all.. it 'presses' thru a thin wood section of the TV box.
    I suppose I could throw a video up... my daughter is visiting but I'll get around to it and post links here.

    Thanks, glad you read about my little Philco Predicta Project. :P



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A47 2020/10/23 (Raspberry Pi/32)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (1337:3/129)
  • From Bob Roberts@1337:3/135 to paulie420 on Mon Oct 26 14:38:18 2020
    Re: Re: New predicta.py code
    By: paulie420 to Bob Roberts on Sun Oct 25 2020 11:10 am

    Thanks, glad you read about my little Philco Predicta Project. :P

    It just reminds me so much of Fallout. I hope one of those videos are of the Duck and Cover drills from the 50's.

    |08~|05B|03ob|08:|06R|03ob|08~
    |07



    ... There is a multi-legged creature crawling on your shoulder.
    --- SBBSecho 3.11-Linux
    * Origin: Halls of Valhalla <> San Francisco <> hovalbbs.com (1337:3/135)
  • From paulie420@1337:3/129 to Bob Roberts on Mon Oct 26 16:07:00 2020
    Thanks, glad you read about my little Philco Predicta Project. :P

    It just reminds me so much of Fallout. I hope one of those videos are
    of theDuck and Cover drills from the 50's.
    ~Bob:Rob~

    LOL - Private Snafu, army cartoons... they get me goin. :P



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A47 2020/10/23 (Raspberry Pi/32)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (1337:3/129)
  • From Dumas Walker@1337:3/103 to PAULIE420 on Tue Oct 27 11:30:00 2020
    LOL - Private Snafu, army cartoons... they get me goin. :P

    Snafu rules. IIRC, those were produced by the same studio that was doing Looney Tunes/Merrie Melodies during that same period.


    * SLMR 2.1a * Mainframe: the biggest PC peripheral you can buy.
    --- SBBSecho 3.11-Linux
    * Origin: capitolcityonline.net * Telnet/SSH:2022/HTTP (1337:3/103)
  • From paulie420@1337:3/129 to Dumas Walker on Wed Oct 28 09:41:16 2020
    LOL - Private Snafu, army cartoons... they get me goin. :P

    Snafu rules. IIRC, those were produced by the same studio that was doing Looney Tunes/Merrie Melodies during that same period.

    Oh, heck yea they were... you can 'feel' it the moment you turn one on. I actually enjoy learning about the history of our country and how America has changed over the last 50 years. It was a different place, some good qualities and some bad...

    Thats what this project really was for me; it brings another time period into my living room, which is a fun way to enjoy the content from back then that would otherwise be lost.



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A47 2020/10/23 (Raspberry Pi/32)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (1337:3/129)