Page tree
Skip to end of metadata
Go to start of metadata

Required Equipment

The following equipment from the evaluation kit is required:

  • 1 x zForce AIR Touch Sensor
  • 1 x FPC cable with connector
  • 1 x Interface board

Additional required equipment:

  • For a sensor of the 90° type: double-sided adhesive tape.
  • An Arduino-compatible board. The I2C library described here supports the following MCUs: ATmega168, ATmega8, ATmega328P.  If you wish to use another MCU, make sure to use an I2C library that works with your hardware. 
    Examples of boards with a supported MCU: 

    • Arduino Uno
    • Adafruit Pro Trinket
    • Arduino Nano
  • An Arduino development environment, for example the Arduino IDE.

Connecting Sensor

  1. Connect the FPC cable to the interface board:
      
    1. Lift the flip lock on the interface board.
    2. Insert the FPC cable into the end of the connector, with the connector pads facing down, towards interface board. The yellow piece of PCB of the connector on the other side of the cable is facing upwards. Make sure the direction is straight into the connector and the pads have reached the end of the connector.

      Make sure the connector pads of the FPC cable are facing downwards, towards interface board. The sensor risks damage if the FPC cable is connected in wrong direction.

    3. Press down the flip lock.

  2. Connect the FPC cable to the sensor:
      
    1. Place the sensor so that the sensor connector pads of the sensor are facing downwards (steel surface upwards).
    2. Insert sensor into the connector on FPC cable (yellow piece of PCB of the FPC connector still facing upwards).
    3. Make sure the direction of the pads is straight into the connector, and the pads have reached the end of the connector.
  3. Wire the pads of +5V, DR-B0, I2C-D, I2C-C, and GND on the interface board to the corresponding pins on the host system. For details, refer to Electrical Integration. Do not connect power until the following steps have been performed. 
  4. If the sensor is of the 0° type: place the sensor on a table with the steel surface facing downwards and with the optical surface facing towards you.

    Make sure no object is within the touch active area of the sensor before connecting power to the sensor through I2C. The sensor calibrates itself when powered on and an object within the touch active area may interfere with the calibration.

  5. If the sensor is of the 90° type: use double-sided adhesive tape to fasten the steel surface of the sensor to the edge of a table, with the optical surface facing towards you. For further information refer to Mechanical Integration.
  6. Connect power to the sensor through the I2C.
  7. The green LED on the interface board lights up when connected.

Downloading and Installing the zForce AIR Interface Library for Arduino

  1. Go to https://github.com/neonode-inc/zforce-arduino.

  2. Download the repository as a .zip file or clone it.
  3. Open the example program provided in the repository in an Arduino development environment, for example the Arduino IDE.
  4. Compile the program.
  5. Flash the Arduino with the example program.

Example Program Pseudocode

The following procedure is executed when you flash the Arduino with the example program:

  1. Call Serial.begin() in order to print to the console window.
  2. Initialize the I2C communication: call zforce.Start and provide which physical pin that is used for the Data Ready signal
  3. Read the bootcomplete message.
    1. Print the message.
    2. Destroy the message by calling zforce.DestroyMessage.
  4. Set the desired settings in the sensor. (In this case enable).
    1. Call zforce.Enable.
    2. Wait for the response to arrive.
    3. Print the response.
    4. Delete the message.
  5. Repeat step 4 for all settings.
  6. Go into the main loop.
    1. Pull zforce.GetMessage for touch notifications.
    2. Check if a touch message is NOT null.
      1. Print the contents of the message.
      2. Destroy the message.
    3. End of loop.

Read More

  • No labels