Yoctopuce libraries

Yoctopuce libraries

People often ask how we manage to drive our USB devices using programming languages such as Javascript. Just for once, let's go for some slideware.

We provide three kinds of libraries to drive our USB devices: native libraries, dynamic libraries, and libraries requiring a virtual hub. All are available with source code.


The native library can drive modules directly connected to the local computer without requiring any driver. The developers only need to use the library in their applications. And the final user only has to start the application, without installing anything else. It's the simplest solution for everyone.

Use of a native librarie
Use of a native librarie



Simplest for everyone, but Yoctopuce. Writing a native library in a specific programming language takes a lot of time. That's why native libraries will only be available initially in C, C++, and Objective-C

The second kind of library is the dynamic one, such as DLLs on Windows and .so on UNIX. Theses are meant to overcome the lack of native libraries in some languages such as Delphi. The DLL embeds the native library written in C, and the developers write their applications using the DLL interface provided fortheir chosen programming language. From the developers' point of view, there is almost no difference. They only need to make sure that their applications can access the DLL once both are installed on the user's computer.

Use of a library with a DLL
Use of a library with a DLL



The third kind of library is mainly used in programming languages, such as Javascript, which prevent access to the computer hardware. These libraries require the help of a little program, the virtual hub, which provides access to the hardware. The developers use an API similar to the other ones, but the library makes a connection to the virtual hub to control the USB devices. The virtual hub can be started from command line, or installed as a service/deamon.

Use of a library with a virtual hub
Use of a library with a virtual hub



The virtual hub also provides a friendly web UI for configuring and testing modules using only a web browser.

Whatever the chosen library , the source code of the application is strictly identical. And one more thing: all three kinds of libraries can access virtual hubs through Ethernet, giving control to devices installed on a remote computer. This makes it possible to connect devices to a tiny PC with low electric consumption, and to access them from a regular computer.

All libraries can access a virtual hub
All libraries can access a virtual hub


Add a comment No comment yet Back to blog












Yoctopuce, get your stuff connected.