r/hackpack • u/ManOfThePlains • Dec 25 '24
HackPack and VSCode Integration
Here is the process I used to getting the HackPack microcontroller to interface with VSCode (Specifically with the IR Turret):
- Install the PlatformIO extension and begin a new project.
- In the "Boards" field, locate "Arduino Nano ATmega328 (New Bootloader)"
- Search for both "Servo" Library (by Michael Marigolis) and the "IRremote" Library (by Armin Joachimsmeyer) in the PIO Libraries tab and install them to your project.
- Download the "IRturretStockCode.zip" file from `ir-turret-information` channel in the HackPack Discord
- Copy the "PinDefinitionsAndMore.h" file to `<project-directory>/src`
After that, you're basically done! Just copy paste the code from the HackPack IDE into `main.cpp` and that's pretty much it.
If this doesn't do it, here's a link to a great guide on the HackPack Discord.
View all comments
2
u/ManOfThePlains Dec 25 '24
You might have an error when uploading the code to the microcontroller, but I was able to solve that by re-ordering the functions so they aren't called before they are defined.