![]() |
HitLib 1.5.0
VEX V5 LED animation library for PROS
|
Or paste the URL directly into the Install Template dialog in the PROS VS Code extension.
Check the Releases page for the latest version and swap the version number above if a newer one is available.
VEXcode has no template system, so HitLib ships as source for it. Download hitlib-vexcode@1.5.0.zip from the Releases page and copy its two folders into your project:
The VEXcode makefile already builds src/*/*.cpp and searches include/, so there is nothing to configure. HitLib notices it is building against the VEX SDK and uses it in place of PROS.
In this download every header ends in .h rather than .hpp, because VEXcode Pro V5 only shows .h files in its file tree. Wherever these docs include hitlib/hitapi.hpp or hitlib/profiles/classic.hpp, a VEXcode project includes hitlib/hitapi.h and hitlib/profiles/classic.h. Then, in main.cpp:
Ports are numbered 1-8 for A-H. Don't also configure that port as a device in VEXcode's device menu; HitLib drives it directly.
Add one include at the top of your main.h or any file that uses hitlib:
To use the built-in profiles, also include:
If your strip is on an ADI expander connected to a smart port:
The braces matter: three bare numbers always mean (adiPort, length, refreshMs) on the brain's own ports.
Pattern Studio is a desktop GUI for designing and live-previewing LED profiles without flashing a brain, then exporting them as ready-to-include HitLib C++.
Download a prebuilt build from the Releases page - HitLibPatternStudio-*-windows.zip for Windows, -macos-apple-silicon.zip or -macos-intel.zip for macOS 13 or later - or run it from source on any platform:
The Mac build is not signed with an Apple developer certificate, so macOS blocks the first launch. Drag the app into Applications, double-click it and dismiss the warning, then open System Settings > Privacy & Security, scroll to Security and click Open Anyway. Confirm when macOS asks again and enter your Mac password. It opens normally after that.
Deploying again overwrites that header and main.cpp does not change: begin() builds every strand from the design's port, length, refresh interval and brightness, attaches each profile and activates its first mode.
To own the wiring yourself, hitlib::studio::begin(yourGroup) puts the design's strands into your group, and #define HITLIB_STUDIO_NO_AUTOWIRE before the include leaves only the profile and the constexpr constants to build your own LedStrand from. Export > Export Current Strand as C++... (or Export All Strands as C++...) still saves through a normal file dialog for a project the app cannot see. See Profiles & Modes for the full shape of the generated file.
If you want to build hitlib yourself rather than using a release zip: this repo isn't set up as a pros make-managed project, so it's a plain library build followed by manual packaging.
This produces hitlib@1.5.0.zip in the project root (matching the version field in template.pros), which you can then fetch with the CLI as shown above. The archive goes in firmware/ because that is the only place a PROS project links archives from, and only include/hitlib/ is packaged: the rest of include/ is the PROS kernel's, which every project already has.
The VEXcode download is the library's sources, with the headers renamed to .h. No toolchain is needed, only Python 3:
vexcode_pkg/ then holds the include/hitlib/ and src/hitlib/ folders to copy into a VEXcode project, exactly as the release zip does. Give it your project's folder instead to install or update HitLib there directly: it replaces those two folders and leaves everything else in the project alone.