Skip to content

Commit

Permalink
Xcode project for shared library
Browse files Browse the repository at this point in the history
  • Loading branch information
Grix committed Nov 9, 2024
1 parent 6a15b62 commit 667cd61
Show file tree
Hide file tree
Showing 12 changed files with 467 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Digital to Analog Converter for laser projectors.
* https://bitlasers.com/helios-laser-dac/

Open source, low cost USB DAC for the ISP-DB25 (ILDA) laser protocol. Allows you to control an ILDA laser projector via computer over USB. Supports lots of third party software (see link above). This repository consists of:
* SDK (with examples in C++, Python and C#/.NET)
* SDK for supporting the Helios USB and IDN DACs in your software (with examples in C++, Python and C#/.NET)
* Hardware (PCB schematic in KiCAD)
* Firmware (Atmel Studio project)
* Extras (firmware update tool, media etc.)
Expand All @@ -16,7 +16,7 @@ Open source, low cost USB DAC for the ISP-DB25 (ILDA) laser protocol. Allows you
Navigate to the folder "sdk" to find the relevant code for interfacing with the Helios DAC in your software, and a readme with more detailed usage instructions.

NEW: The C++ sdk has been updated to include IDN network support. This means that if you implement/update the Helios library in your application, it will also seamlessly enable support for any other network DAC using the IDN protocol, including the Helios OpenIDN adapter, StageMate ISP, and upcoming Helios products.
** Other libraries than the C++ one has not yet been updated with IDN support.**
**Other libraries than the C++ one has not yet been updated with IDN support.**

The reference SDK is written in C++, in the subfolder "cpp". But libraries with exported functions that you can call from many languages such as python or C# are available, documented in HeliosDacAPI.h. You can also find examples of usage in the examples folder.

Expand All @@ -42,7 +42,7 @@ A more detailed guide for compiling for Raspberry Pi (Linux ARM) is also availab
#### Hardware and firmware modification

The PCB is drawn in Kicad. The firmware is written and built with Atmel Studio for the ATSAM4S2B microcontroller.
NB: The license for the hardware and firmware, unlike the software, does not permit the sale of manufactured units.
**NB: The license for the hardware and firmware, unlike the software, does not permit the sale of manufactured units.**
New firmware can be uploaded to the device over USB. To do this, you must reset the "GPNVM1" bit in the flash memory, which will make the microcontroller boot to the SAM-BA bootloader. You can do this by sending a special interrupt packet to the DAC. You can then access the flash using Atmel's SAM-BA software or BOSSA. There is an automatic tool for firmware updating:

* Download the firmware updating tool (only for Windows as of now, Mac/Linux partially done): utility/FirmwareUpdater/cli/firmwareupdater_script.zip
Expand Down
6 changes: 4 additions & 2 deletions sdk/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
There are currently official libraries for C++ and C#, see the respective subfolders.
There also exists Rust and Javascript libraries from third parties, but they are not covered here.

**NEW**: As of October 2024, the C++ SDK has been updated to include IDN (network) support. This means that if you implement/update the Helios library in your application, it will also seamlessly enable support for any other network DAC using the IDN protocol, including the Helios OpenIDN adapter, StageMate ISP, and upcoming Helios products. This also enables more capabilities such as higher resolution and more data channels. This is reflected by the choice of multiple WriteFrame\*() functions, such as WriteFrameHighResolution() and WriteFrameExtended().
**Since only the C++ library supports this as of now, it is recommended to use that. Other languages can link to the C++ share libraries dynamically.**
The original WriteFrame() with 12-bit XY resolution and 8-bit RGBI channels have been preserved for backwards compatibility and a light-weight alternative, but for new or updated applications, it is recommended to choose at least WriteFrameHighResolution() instead. It gives you the most common channels, XY+RGB, with 16-bit resolution each. It is safe to call this function even if the DAC in use does not support these resolutions, the library will automatically convert the data.

Common to all languages:

BASIC USAGE, common to all languages:
Expand All @@ -20,5 +24,3 @@ received (but the flag HELIOS_FLAG_SINGLE_MODE will make it stop playback instea
The GetStatus() function actually checks whether or not the buffer on the DAC is empty or full. If it is full, the DAC
cannot receive a new frame until the currently playing frame finishes, freeing up the buffer.

**NEW**: As of October 2024, the C++ SDK has been updated to include IDN (network) support. This means that if you implement/update the Helios library in your application, it will also seamlessly enable support for any other network DAC using the IDN protocol, including the Helios OpenIDN adapter, StageMate ISP, and upcoming Helios products. This also enables more capabilities such as higher resolution and more data channels. This is reflected by the choice of multiple WriteFrame\*() functions, such as WriteFrameHighResolution() and WriteFrameExtended().
The original WriteFrame() with 12-bit XY resolution and 8-bit RGBI channels have been preserved for backwards compatibility and a light-weight alternative, but for new or updated applications, it is recommended to choose at least WriteFrameHighResolution() instead. It gives you the most common channels, XY+RGB, with 16-bit resolution each. It is safe to call this function even if the DAC in use does not support these resolutions, the library will automatically convert the data.
Binary file modified sdk/cpp/libusb_bin/macOS/libusb-1.0.0.dylib
Binary file not shown.
2 changes: 2 additions & 0 deletions sdk/cpp/shared_library/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
This is the shared library extension of the Helios DAC SDK, used to produce a library file for dynamic linking, like .dll, .so or .dylib. It has compatibility functions with the EzAudDac functions.
If dynamic linking is not neccessary, you can simply use the files in the parent folder (HeliosDAC.cpp, HeliosDAC.h and the source files in the idn folder) directly in your source code, with no additional files or build steps needed.

NB: These libraries depend on libusb. In addition to HeliosLaserDAC.dll/dylib/so you also need libusb-1.0.dll/dylib/so in the same folder, or installed on the computer some other way. You can find these files in the ../libusb_bin folder.

BASIC USAGE:
1. Call OpenDevices() to open devices, returns number of available devices.
2. To send a new frame, first call GetStatus(). If the function returns ready, (1), then you can call WriteFrame\*().
Expand Down
Binary file added sdk/cpp/shared_library/libHeliosLaserDAC.dylib
Binary file not shown.
Loading

0 comments on commit 667cd61

Please sign in to comment.