Skip to content

PiETLab/TreasureBoxBrailleApps

Repository files navigation

Treasure Box Braille Apps

This repository is dedicated to both Authoring App and SCALP App.

  • IMPORTANT: Both projects use Java 8, and they don't work with further versions of java

  • Authoring App: This is a GUI application that enables the creation of Scenario files.

    • Scenarios are text files that together with some associated audio files will be executed by the Raspberry Pi.
    • This app responsibility is to output a formatted text file and associated it with the correct audio files.
    • The Authoring app can record audio for your scenarios. It creates .wav files at CD quality (Sample rate: 44.1 kHz, Bit depth: 16). If you plan to use your own audio recordings, it is recommended that it is recorded using the same sample rate and bit depth for maximum compatibility on all platforms.
  • SCALP: This app is responsible for running the Scenario files inside the Raspberry Pi (also the Desktop for debugging).

    • SCALP means Select-(as per)-Config-and-Launch-Player
    • SCALP contains a separate repository called Treasure Box Braille Setup which has a complete tutorial on how to set up a Raspberry Pi with the SCALP app. On that note, the repository contains a series of shell script programs that automatically feed the Scenario files into the SCALP App

How to run both apps in development mode

  1. Download Eclipse IDE for Java Developers

  2. Import the project using Eclipse

  • first_step
  • second_step
  • third_step
  1. Install JDK 8 in order to run the project code properly
  • Click here to install
  • After installing go to Eclipse -> Preferences -> Java -> Installer JREs
  • Click Add and select Standard VM
    • add_java_8_support
    • add_java_8_support2
    • The path for MacOSX should be something like: /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home
  • Finally click Finish
  • Make JRE 8 as your default option
    • add_java_8_support3
  1. Import all necessary libraries to the project
  • Right click on the project folder, and select Import
    • import_libs
  • Select Projects from Folder or Achieve
    • import_libs2
  • Import the lib folder
    • import_libs3
  1. In order to run the Authoring App, open src/common and execute the EntryPoint.java file
  • last_step
  1. In order to run the SCALP App, open src/enamel and execute the SCALP.java file
  • last_step2

How to make an Authoring App JAR

  1. To build the Authoring App jar right click on the project folder and select the Export folder
  • export_jar
  1. Select the Runnable JAR option
  • export_jar2
  1. Select the EntryPoint - AuthoringApp option from the drop down, mark the Package required libraries into generate JAR option and click Finish
  • export_jar3

How to make an SCALP JAR

  1. To build the Authoring App jar right click on the project folder and select the Export folder
  • export_jar
  1. Select the Runnable JAR option
  • export_jar2
  1. Select the SCALP - AuthoringApp option from the drop down, mark the Copy required libraries into a sub-folder next to the generated JAR option and click Finish
  • Name the file as Enamel.jar
  • export_jar3
  1. To run the JAR file do the following:
  • Move the generated Enamel.jar file to the Enamel folder inside the project
  • Open the terminal, navigate to the Enamel folder and run
    • /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/bin/java -jar Enamel.jar START_FACTORY FactoryScenarios/
    • Remember to create a logs folder if it does not exist
    • running_simulator

Raspberry Pi debugging

  • In order to debug the SCALP app using a Raspberry Pi follow the steps:
  1. Navigate the /home/pi: cd /home/pi
  2. Clone the repository: git clone https://github.com/PiETLab/TreasureBoxBrailleApps
  3. Close the terminal and open the BlueJ Java IDE
  • bluej-icon
  1. Click on Project -> Open Project and select the src file.
  • bluej-src
  1. Check if all the dependencies were imported correctly
  • Navigate to the top menu and click on Tools -> Preferences
  • Go to the Libraries tab, and you should see all libraries with status Loaded
    • bluej-loaded
      • In case the status is not Loaded, re-import the libraries by clicking on the Add button and navigating to the lib folder. Add lib by lib to the project manually.
  1. Double click the Enamel package in the center of the window.
  • bluej-open-project
  1. Finally, right click both SCALP and ToyAuthoring classes one at a time and select Compile
  • bluej-compile
  1. After compiling both classes, right click again on ToyAuthoring and select void main(String[] args)
  • This command will run the ToyAuthoring main class with an example scenario.

API Documentation

  • For further API documentation about every single package and class, visit the doc folder and open the index.html file.

    • documentation
  • To generate a more recent API documentation click on Project -> Generate Javadoc

    • generate_docs

How to contribute

  • Click here for complete instructions