Circurity banner

Circurity

6 devlogs
25h 13m 18s

A web application for creating and simulating logic circuits with logic gates and simple components. The inspiration for the project was MultiMedia Logic – I couldn’t find any modern, free and easy to use alternatives, so I decided to create my own. I’m learning Angular in the process.

Demo Repository

Loading README...

adamd

Shipped this project!

Version 1.0 is ready!

Im happy to ship this project! I still have lots of ideas and plans in my head but I want to get those 25hrs of my head for now! Hope you like the app! :)

adamd

Today’s changelog:

  • Added categories for the components in the palette (on the left) and the ‘favourites’ category (which doesnt really work yet because you cant add any component to it, but Im working on it).
  • Fixed removing wires – you now can just grab a wire on a connected out and drop it on the vooooid.
  • Added the XOR logic gate

While recording the video below I noticed a bug (you can see Im unable to connect the XOR gate if its added right after an other deleted gate with the same ID)😅 I dont know why that is happening exactly, but Im adding it to the TODO list.

0
adamd

Finally working!!!

The simulation mode now fully works and you can design your logic circuits! The image below is an example (working) implementation of an twobit adder.

Attachment
Attachment
1

Comments

aloyak
aloyak 4 days ago

this is really interesting and looks awesome bro, i love the idea!! :)))

adamd

Some more progress today

Those 6-7hrs of work went mostly into coding the core features of the app – you can now add components to the design and connect them with wires. The next goal is adding switches and LEDs and simulation.


Other things done for this devlog:

  • Adding function templates for drawing selection indicators
  • Learning the PWA package for future porting
  • Updating readme
  • Finally fixing the flipped Y axis
  • Separating rendering thumbnails and world component

Detailed code changes in commit descriptions in my repo :)

Attachment
0
adamd

Helloo

The biggest change today is the ability to move components in the design area. And yes - the app is still not usable, but I think it’s safe to say the progress is being made.
I added some visual improvements (please ignore the weird numbers and colors on the components for debugging from the lastest commit) and made some noticeable changes to the code structure like:

  • added IDs to components,
  • changed the component class template from interface to abstract to be able to create shared functions
  • cleaned up the mess with the positive y axis in the code vs the interface

And some more changes (you can see in the commit history if you really want to). Note for future me tho – I need to commit more frequently and more logically so it is easier to review and rollback if needed.

Attachment
0
adamd

Little update: I made some improvements to the UI base and added the actual logic gates. For now there are only logic gates and only 3, but I put some effort into making it easily scalable and modifiable. It took some time to organize the project files so I don’t get lost trying to add things and also on the drawing (I still can’t get it quite right). I used the js’s interface feature to create a ‘template’ for any electrical component and now I just add a file that implements that interface class whenever I want to add anything. Now when I have the three basic gates, next up is going to be connecting them, making a power source and some LED to display the outputs. And simulating the circuit, of course.

Attachment
0
adamd

This is the first serious web application I’m working on, and I decided to use AngularJS. I didn’t exacly put much thought on the choice of the first JS framework, tbh, I just checked the 4 most popular, liked the appearance of the site, and found it was developed by Google. I watched an introduction tutorial on YouTube and liked the project structure so I started using it. I’m assuming that it is probably on the most optimal choice for this project, especially if I want to learn the basics (the code will probably be messy and whenever I learn something new I will see how bad the older code really is), but I’m sure it will be fine… (in the worst case I’ll just rewrite the typescript part)

The project will focus on creating simple circuits with logic gates and simple analog and digital components (switches, sensors, buttons, etc.) and more coming in the future if the project will work out.

I will now work on the basic wires, ANDs and ORs and I’ll see you in the next devlog when some significant changes occur in the project. :)

Attachment
0