• The soft side of things

    Joe01/12/2016 at 18:39 0 comments

    Today I have begun working on the software aspect of the project as I don't currently have access to the 3D modeling resources I was using yesterday, which involves two main parts. The first is the python script that opens the video file stream to be displayed on the screen using the picamera library. The code has mostly been copied, and the complete documentation can be found here.

    import io
    import picamera
    
    stream = io.BytesIO()
    with picamera.PiCamera() as camera:
        camera.resolution = (640, 480)
        camera.start_recording(stream, format='h264', quality=23)
        fullscreen = TRUE
        camera.wait_recording(15)
        camera.stop_recording()

    The second main part is the launcher script, which was created with help from this tutorial on instructables. This script is necessary because as soon as the goggles are turned on, the pi boots and needs to start displaying the feed with no user input, as there will be no user input devices connected. The python file is called "NVG.py" and can be found in the NVG folder in the root directory. It also needs to be made executable, as illustrated in the tutorial.

    #!/bin/sh
    # launcher.sh
    # navigate to home directory, then to this directory, then execute the script, then back home
    
    cd /
    cd home/pi/NVG
    sudo python NVG.py
    cd /

    The crontab background process needs to be modified so that the file runs on startup, using the following lines:

    sudo crontab -e
    @reboot sh /home/pi/bbt/launcher.sh >/home/pi/logs/cronlog 2>&1

    Now the NVG.py file should be launched on startup and the video stream should be displayed to the screen.

  • Getting Started

    Joe01/10/2016 at 18:37 0 comments

    First day seriously working on the project, and I have begun hand sketching and using Rhinoceros 5 3D for the modeling of the headset that will house the pi, screen, LEDs, and the battery pack for the LEDs. The pi will be powered by an external USB battery pack that will be run from a backpack, in addition to the screen battery pack. I also started writing the python script with the picamera library that will be used to start a live stream on the screen.

    The pi runs off of USB voltage (5V), the LEDS 1.7V, and the screen 12V, so keeping all the power systems organized and condensed will be a challenge.