===============================================================================
BrainStem2 C++ Example Readme
===============================================================================

This is a basic C++ example using the 40-pin USBStem Module. When run, this
example demonstrates reading the input voltage, flashing the user LED, reading
the analog and digital inputs and writing data to I2C.

Notes:
===============================================================================

# To build, copy the "lib" directory from "..\..\..\..\api" into this 
    directory. The lib directory contains the required header files, and the 
    Brainstem2 DLL and LIB files.

# The output directory is win32_BrainStem2Example/Debug.

# A build step has been added to the project that copies the shared object into 
    the build output directory.

# Linking to the static library to create a stand-alone executable is possible
    with modifications to the Visual Studio project. If you wish to link against the
    static library follow these instructions.

      - Open the associated project in Visual Studio
      - Open the Solution Explorer
      - Right click on Solution 'BrainStem2Example', select Configuration Manager...
      - Under Active solution configuration, select <New...>
      - In New Solution Configuration Window, enter Static for the name,
        Copy settings from Release and check Create new project configurations.
        Select OK.
      - Close Configuration Manager window.  Static should be selected as the
        active configuration.
      - Select the BrainStem2Example project properties.
      - From the BrainStem2Example Properties Pages, under C/C++, select
        Code Generation. Select Multi-Threaded (/MT) for the Runtime Library.
        Click the Apply button.
      - On the BrainStem2Example Properties Pages, under Linker, select Input.
        Edit the Additional Dependencies and replace lib/BrainStem2.lib with
        lib/w32/BrainStem2static.Lib and append the list with iphlpapi.lib,
        ws2_32.lib, winusb.lib and setupapi.lib.  Click OK.
      - Also under Linker, select Debugging and set Generate Debugging Info
        to No. Click the OK button to exit the BrainStem2Example Properties Pages.
      - Right click the BrainStem2Example project in the solution explorer and
        select Build.

    Upon successful build, the stand-alone executable file is found in the
    Win32_BrainStem2Example/Static folder of the project folder.

If you have questions, please see the reference, or check out our guides 
at www.acroname.com.

