Inspiration
In order to automate the process of writing lab reports, I needed a tool that can create schematics
What it does
The module will take in a string containing boolean logic and then generate an image representing the logic circuit.
How I built it
The program first uses a math parser to build a syntax tree for the boolean logic expression. It then maps each elements in the syntax tree to a logic gate. In order to manipulate images I used a node js wrapper for imagemagic.
Challenges I ran into
Nodejs is not a very comprehensive platform for generating images. I spent a few hours figuring out the right strategy and modules to use. Also, I spent far to much time trying to get the schematic to be centered.
Accomplishments that I'm proud of
I didn't realize at first how difficult it would be to turn a boolean expression into a circuit programmatically. It ended up requiring several parser, abstract syntax trees, and recursion. I am proud that I was able to acomplish this.
What I learned
I learned more about data structures like abstract syntax trees. I also had to figure out how to build a net list that keeps track of a network of objects that are connected.
What's next for schematicgenerator
schematicgenerator is hardly polished, the code could be cleaned up. As features go, the schematic should display wires with only right angles and route the wires. Currently, the wires just go from point a to b directly.
Log in or sign up for Devpost to join the conversation.