AdvaBoard RPi1 example-programs

You can freely use and modify the examples, and use them as starting point for your own applications.

All example-programs assume that the AdvaBoard RPi1-software is already installed.

example programs

  • info_led:

    Retrieve and print system-information from the AdvaBoard RPi1 and make the AdvaBoard RPi1-LED blink.

  • display: (currently only shell and C)

    Setup the display and draw some images on it (without using a framebuffer).

compile/run

C:
  • init compilation:

    cd build
    cmake ..  # needs only to be called once, and after changes to CMakeLists.txt
    
  • compile all examples:

    make
    
  • compile a single example:

    make EXAMPLE
    
  • run:

    sudo ./EXAMPLE
    
Python:
  • run with Python 2 (>= 2.6):

    sudo python ./EXAMPLE.py
    
  • run with Python 3:

    sudo python3 ./EXAMPLE.py
    
Java:
  • compile all examples:

    make java
    
  • compile a single example:

    javac -cp /usr/local/share/java/am_rpi.jar EXAMPLE.java
    
  • run:

    # as root:
    export LD_LIBRARY_PATH=/usr/local/lib/
    java -cp /usr/local/share/java/am_rpi.jar:. EXAMPLE
    
    # or with sudo:
    sudo LD_LIBRARY_PATH=/usr/local/lib/ java -cp /usr/local/share/java/am_rpi.jar:. EXAMPLE
    
Shell:
  • run:

    sudo ./EXAMPLE.sh