On the side of our dashboard for TTN Den Bosch we, some time ago, created a tool to generate Arduino sketches in a simple and fast way for the members of our community.
I know there is still a lot to do, but the basics are working. Maybe it is time to share it with a bigger audience.
The tool is in PHP/Mysql.
The base is a template where some spots need to be filled depending on selection of radio, sensors, etc.
The tool is a form to enter/select the variables and a function to generate and display the sketch. The generated sketch can be copied to the Arduino IDE.
The function simply replaces some placeholders in the template and inserts the code that belong to the selected radio and sensor.
Things I would like to add:
access TTN console to select a device and get the device keys
test RN2483 radio; more specific which library to use best and test OTAA
use the device keys in the (string) format as currently displayed in the console
Please give it a cool name âAutomatic TTN - Code Generatorâ aka âAT-CGâ, or something, then please put it on github for others to help (i would love to do so).
Stuff i would like to add:
Give the Pinmappings âNamesâ aka âPinmapping for loratracker PCBâ/âPinmapping for charles red PCBâ/etc.
Add Pictures from those PCBs, so people are 100% sure to take the right one
Add custom pins for the sensors
Put deveui/appeui/etc. in seperated input fields to make copy&paste easier
Tell about the used libraries for the different sensors outside of the code (make a warning on top for example) and make it easy for people to find/download/install them
Just to give you a few ideas - and thank you very much for the work done already!