FabAcademy 2022 Jose Luis Reategui

Week 14

Interface and Application

Assignment Files

  • Arduino File
  • Arduino File
  • Unity3D File
  • assignment
  • individual assignment:
  • write an application that interfaces a user with an input &/or output device that you made
  • group assignment:
  • compare as many tool options as possible
  • To be able to do the interface we have to load a program to the arduino, this program must be able to receive and send instructions through the serial monitor, that means we have to consider the speed of the connection. For this assignment consider 9600 bauds, and the Serial library of Arduino "Serial.write", and "serial.read" with a conditional structure that allows to visualize the changes in the electronic components.

    To generate the interface use two programs, Processing and Unity3D. The most important thing to be able to visualize the data is to connect to the serial port, this is achieved through the Serial processing library and the C # Serial library in Unity.

    To send and receive data from arduino it is necessary to program it for serial communication, in the following image it is shown as:

    Image

    If we use processing we must download the library that allows you to quickly create "ControlP5" interfaces, review the images

    Image
    Image
    Image

    In Processing.org there is a library that enable to use GUI resources.

    Image
    Interfaces Video Link

    In Unity it is necessary to create a Script that contains the Serial connection, previously we have to enter the option of Api Compatibility Level 2.0

    Image
    Image
    Image
  • Outlined problems and how you fixed them
  • The main problem to solve is the serial communication, it is necessary to indicate what will be the connection speed of arduino, and in function to that configure the processing library. You have to prepare Unity-C # Api to be able to communicate by COM port