Arduino Forum

Community => Exhibition / Gallery => Topic started by: jsmith2021 on Jun 11, 2019, 10:46 am

Title: Dynamically Arduino from Python3
Post by: jsmith2021 on Jun 11, 2019, 10:46 am
Hello,

On the topic of dynamic code generation, I am working on an Arduino Class Generator which automatically creates a class body (.cpp), header (.h),  keywords (.txt), and example file (.ino) from an Arduino Sketch

The motivation for my project is that I found myself writing sketches to create the functionality I wanted, and then manually converting that sketch into a library for object orientated programming and sharing.

This process consists of parsing the sketch into the necessary information to make a library, like comments, variables, methods, and other included libraries

The included files demonstrate the project. Morse.ino is the original sketch, and MorseParsed is the intermediary file used to generate Morce.cpp, Morse.h, MorseExampleFile.ino, and MorseKeywords.txt

The github for the project is here (https://github.com/jsmith2021Brandeis/Arduino-Class-Maker)
and I made a pull request (https://github.com/arduino/Arduino/pull/8967) to include it in the github IDE, the ClassGeneratorInIde picture shows what using the IDE would like like if my change is accepted

I also posted this on the forum here (https://forum.arduino.cc/index.php?topic=610135)

Does anyone reading have thoughts on this project?