8055N++ v1.0
Welcome to 8055N++, a collection of Open Source C++ classes which
encapsulates the K8055,
K8055N,
WPI110N,
WSI8055N,
VM110 &
VM110N USB Experiment Interface boards
from Velleman / Whadda using the Windows HID APIs.
The code below shows a simple example to connect to the board and blink all
the digital outputs on the board:
_tprintf(_T("Enumerating K8055, K8055N, VM110 & VM110N HID devices on
this computer\n"));
HID::StringArray deviceNames;
bool bSuccess =
HID::C8055NDevice::Enumerate(deviceNames);
HID::String sDevicePath;
for
(const auto& device : deviceNames)
{
sDevicePath = device;
_tprintf(_T(" Found device path of %s\n"), device.c_str());
}
if
(sDevicePath.length() == 0)
{
_tprintf(_T(" No devices found\n"));
return 1;
}
HID::C8055NDevice device;
device.Open(sDevicePath.c_str());
int nCycleDigitalChannel{1};
while
(true)
{
device.ClearDigitalChannel(nCycleDigitalChannel);
Sleep(100);
nCycleDigitalChannel++;
if (nCycleDigitalChannel
== 9)
nCycleDigitalChannel = 1;
device.SetDigitalChannel(nCycleDigitalChannel);
}
The complete list of classes which 8055N+ provides are:
- HID::C8055NDevice which provides a C++ class encapsulation of the
functionality of the boards. This class uses the author's
HIDWrappers to talk
to the boards..
- HID::C8055NClientDevice which provides a wrapper for the K8055D.DLL
which is the primary API interface to the boards. This class can talk to
either the Vellerman DLL or the author's reimplementation. This class hides
the details of using LoadLibrary / GetProcAddress.
- HID::C8055NClientDevice2 This class is used to implement the K8055D.DLL
implementation included in 8055N++. Client code can also use this instead of
HID::C8055NClientDevice to talk to HID::C8055NDevice without the need to go
through the K8055D.DLL.
Features
- Supports all the K8055, K8055N, VM110 & VM110N USB Experiment Interface
board variants. This includes the old USB protocol used by the K8055 and
VM110 boards and the newer USB protocol supported by the K8055N and VM110N
boards.
- Encapsulates all the
functionality exposed by the boards as of v5.0.0.4 of the Velleman
K8055D.DLL.
- Functionality is implemented directly using C++ without the need to go
through the Velleman K8055D.DLL if desired.
- Implements a compatible version of the Velleman DLL for existing
applications which use the Velleman DLL. Binaries for this DLL are provided
in x86, x64, ARM32 and ARM64 variants for Windows in the download.
- The classes have no external dependencies on other libraries such as ATL or
MFC.
- Provides a full reimplementation of the Velleman demo application in C++
MFC.
- The reimplementation of the Velleman demo application can use either the
Velleman K8055D.DLL, the author's replacement K8055D.DLL or can call the
8055N+ classes directly, to talk to the boards.
Usage
- To use 8055N++ in your project simply #include "8055N++.h" from
the test application in your application and use whatever classes you need from
the HID namespace.
- You will also need to download the author's HIDWrappers classes from
http://www.naughter.com/hidwrappers.html.
This provides the HID API functionality used by 8055N++.
- The classes are only supported on VC 2022 or later.
- Included in the download is a VC 2022 solution to build the replacement
K8055D.DLL and a GUI based MFC application which implements all the
functionality of the demo application provided by Velleman / Whadda for the
board and which can be used to fully exercise and unit test the code in
8055N+.
History
1.0 (8 April 2023)
Contacting the Author
PJ Naughter
Email: pjna@naughter.com
Web: http://www.naughter.com
8 April 2023