Articles / Electric Ruby Gem

posted: 08/14/2014


When building projects with the Arduino, I often need to use a specific resistor value or calculate what resistor value I will need to power an LED or some other component. This usually requires me googling 'resistor color calculator' or 'ohms law calc' to get to a website that can make these calculations quick and easy.

Because I usually end up going to a different site each time I search for one of these tools, I decided it might be fun to build some calculators in Ruby and add them to my website for easy access. You might already have a site or two bookmarked but if not, feel free to use my site.

The calculators are a work in progress, so currently I have only added the resistor color code calculator and the Ohm's law calculator to my site, but I will be adding more soon.

If you are a Ruby programmer and have any suggestions or just want to play with the calculator, feel free to check it out here:


The calculations are made in Ruby in the gem, but I wrote quite a bit of javascript to handle the user interface for the Ohm's law calculator - the html portion might make it into the gem (or a separate related gem), but I also might just rewrite the whole thing in javascript and package that up.

That is all.