This guide is designed to help you get a 2D force-feedback haptic simulation up and running as quickly as possible. Before you begin, please follow the instruction manuals for constructing the Haply device, installing software and libraries, and download the example projects.
We will first load the arduino firmware onto the Haply microcontroller board. The firmware interprets commands sent from the virtual environment on the computer, specifically motor torque outputs, while simultaneously updating the virtual environment on the current state of the device.
Start by plugging in the power supply and connecting the Haply board to the computer through the Arduino Native port using a micro-USB cable.
Open the arduino sketch “Haply Firmware v0.ino.” After the sketch is open in the Arduino IDE, select the ‘Tools’ tab at the top and then select the ‘Board’ option. Choose the option ‘Arduino Due (Native USB Port)’ as seen below:
Next we will specify the port selection so that the Arduino IDE knows which port the Haply Board uses to connect to the computer. Select the ‘Tools’ tab at the top and then select the ‘Port’ option. Choose the Port connection option for your Haply Board. Here are some examples of Port options you will see for different operating systems:
Finally, we are ready to upload the Haply firmware onto the Haply Board. Press the upload button near the top. This will compile the Arduino program and upload the compiled software onto the Haply Board. Once the upload is finished you should see the following confirmation screen stating that the upload was successful:
Open up the .pde Processing sketch file in the Processing IDE from one of the Examples projects. Before starting an example, you may need to explicitly specify the Serial USB port that is being used. In the 'setup' portion of the sketch file, find the line defining a new instance of the board object:
Change the board declaration to the specific Serial USB port used by the Haply Board as determined from the previous section. For different operating systems, this will look like:
Once the Arduino Firmware has been loaded onto the Haply Board, and the needed Serial USB port change has been made to the Processing sketch, you are ready to start the Haptic Simulation. Before starting, make sure the Haply device is in the initial starting position:
Now click the Run button on the Processing sketch to start the haptic simulation. In this example we are running a basic virtual wall simulation: