Use the two buttons at the left to change the style of this page

JavaScript to Change CSS Dynamically

This is a demonstration of how you can have two totally different style sheets and by using Javascript, can change the page colours, fonts in fact any of the styling elements with the click of a button. The following text is just a sample formatted paragraph from one of my other pages to illustrate the technique. Pretty cool hey.

Here are five different methods of connecting 7 segment LED displays to an Arduino or Atmega328 that I would like to show you. They are only simple counter codes either automatically counting via the code or incremented / decremented via a pair of push button switches or a potentiometer. I have used 220 ohm resistors in all these circuits but you would be advised to calculate the correct ones required for the particular 7 segment displays that you are using. This will ensure that you do not damage the IO pins of the 328 IC.
The constraints to these maximum currents courtesy of Terry King & Crossroads of Arduino forum are

The IO pins have an absolute maximum rating of 40 mA per pin.The following groups of pins should not have more than 100 mA drawn from them
◀ Digital pins 0 to 4
◀ Digital pins 5 to 1
◀ Analog pins A0 to A5
In addition to that, the entire processor chip has a maximum rating of 200 mA current consumption
In the following five methods explained, the 7 segment displays are common cathode and the shift register is a 74HC595

Javascript and tutorial courtesy of