{"id":2680,"date":"2017-01-12T17:10:12","date_gmt":"2017-01-12T17:10:12","guid":{"rendered":"https:\/\/www.pinballnews.com\/site\/?p=2680"},"modified":"2019-12-29T19:26:35","modified_gmt":"2019-12-29T19:26:35","slug":"pin-uino","status":"publish","type":"post","link":"https:\/\/www.pinballnews.com\/site\/2017\/01\/12\/pin-uino\/","title":{"rendered":"PIN-&#8216;UINO"},"content":{"rendered":"<p class=\"BodyBold\">What is a <em>pin-\u2018Uino<\/em>? The term is a portmanteau of the words <em>pinball<\/em> and <em>Arduino<\/em>. As you are probably reading this article in Pinball News&#8217;s <a href=\"http:\/\/www.pinballnews.com\/learn\/index.html\" target=\"_new\" rel=\"noopener noreferrer\">Learn How<\/a> section, you may be familiar with pinball machines. However, you may not be familiar with the <a href=\"https:\/\/www.arduino.cc\/en\/Main\/FAQ\" target=\"_new\" rel=\"noopener noreferrer\"><em>Arduino<\/em><\/a>.<\/p>\n<p><em>Arduino<\/em> is an open-source platform for ATmega 168 and 328 microcontrollers. You can use the microcontroller as part of your own custom pinball add-ons, modifications and toppers.<\/p>\n<p><em>Arduino<\/em> is the American-branded version. <em>Genuino<\/em> is the version branded for the rest of the world. Save labeling differences, both boards are <a href=\"https:\/\/www.arduino.cc\/en\/Main\/ArduinoBoardUno\" target=\"_new\" rel=\"noopener noreferrer\">very similar<\/a>. An <a href=\"https:\/\/store-usa.arduino.cc\/products\/a000066\" target=\"_new\" rel=\"noopener noreferrer\"><em>Arduino UNO<\/em><\/a> board and <a href=\"https:\/\/www.arduino.cc\/en\/Main\/GenuinoProducts\" target=\"_new\" rel=\"noopener noreferrer\"><em>Genuino UNO<\/em><\/a> board are juxtaposed, below.<\/p>\n<figure style=\"width: 580px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/1.jpg\" alt=\"The Arduino and the Genuino\" width=\"580\" height=\"210\" \/><\/a><figcaption class=\"wp-caption-text\">The Arduino and the Genuino<\/figcaption><\/figure>\n<p>For more information about using an <em>Arduino<\/em> microcontroller, see the instructions put together for middle schoolers, <strong><a href=\"https:\/\/www.pinballnews.com\/site\/2017\/01\/11\/intro-to-arduino\/\" target=\"_new\" rel=\"noopener noreferrer\">Intro to Arduino<\/a><\/strong>. Be sure to read this instruction article before continuing with this project article (<strong>pin-\u2018Uino<\/strong>).<\/p>\n<p>Don\u2019t be fooled by the simplicity of the instructional article or this project article. Some very complex programs (sketches) can be run on most <em>Arduino<\/em> microcontrollers and their clones. In fact, <a href=\"https:\/\/www.youtube.com\/results?q=arduino+Pinball&amp;sm=3&amp;app=desktop\" target=\"_new\" rel=\"noopener noreferrer\">entire pinball machines<\/a> have been built using the surprisingly powerful <em>Arduino<\/em> and clever programming.<\/p>\n<p><strong><u>Old vs. New<\/u><\/strong><\/p>\n<p>In a set of previous <a href=\"http:\/\/www.pinballnews.com\/\" target=\"_new\" rel=\"noopener noreferrer\">Pinball News<\/a> articles, we shared with you relay controllers you could use to make your own custom pinball add-ons, modifications, and toppers.<\/p>\n<ul>\n<li>Previous initial article: <a href=\"http:\/\/www.pinballnews.com\/learn\/ldr.html\" target=\"_new\" rel=\"noopener noreferrer\">Automatic for the People<\/a><\/li>\n<li>Previous second article: <a href=\"http:\/\/www.pinballnews.com\/learn\/ldr2.html\" target=\"_new\" rel=\"noopener noreferrer\">A Little LDR Update<\/a><br \/>\n(update to initial article)<\/li>\n<\/ul>\n<p>Note: See these articles for information, description of discrete electronic parts and where to purchase those parts.<\/p>\n<p>As in the previous two articles, although we are still going to use a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Photoresistor\" target=\"_new\" rel=\"noopener noreferrer\">light dependant resistor<\/a> (LDR), this third article moves on from using a simple relay controller to a microcontroller; namely the <em>Arduino UNO<\/em> (R3, 5 Volts).<\/p>\n<p>Note: See the end of this article for additional parts and purchasing information.<\/p>\n<p><strong><br \/>\n<u>Relay vs. Microcontroller<\/u><\/strong><\/p>\n<p>The discrete electronic component known as a relay is considered a &#8216;dumb&#8217; device. We will be using a &#8216;smart&#8217; (programmable) device; a microcontroller.<\/p>\n<p>Though not capable of handling high power like a relay, with the 40 milliamp maximum peak (per pin) current handling capabilities of the <em>UNO<\/em> we can safely run a handful of <strong>L<\/strong>ight <strong>E<\/strong>mitting <strong>D<\/strong>iodes (<strong>LED<\/strong>s) to add new lamps to our pinball machines or pinball projects.<\/p>\n<p>For the learning purpose of this project and as to <strong>NOT<\/strong> overload the microcontroller, we will be using a single indicating <strong><a href=\"http:\/\/www.pinballnews.com\/learn\/leds.html\">Light Emitting Diode<\/a><\/strong> (<strong>LED<\/strong>). An alternate sketch and additional add-on method for using a <em>UNO<\/em> microcontroller to light multiple LEDs are both mentioned later in this article, but they are not covered in much detail. If you want to light multiple LEDs see the links in the <strong><a href=\"http:\/\/www.pinballnews.com\/learn\/pinduino\/index2.html\" target=\"_new\" rel=\"noopener noreferrer\">Intro to Arduino<\/a><\/strong> article and at the end of this article for more information.<\/p>\n<p>In this primer article, we will be using either a single T-1 3\/4 (\u00f85 mm) or T-3 1\/4 (\u00f810 mm) radial leaded discrete electronic component. One of several colors will work. This type of LED usually requires about 20mA of direct current. Unfortunately, you can\u2019t just plug an LED straight into your +5 Volt <em>UNO<\/em>. You must use a dropping resistor in series with the LED.<\/p>\n<div align=\"center\">\n<table border=\"0\" width=\"560\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n<tbody>\n<tr bgcolor=\"#FFFFDD\">\n<td class=\"BodyCentreBold\" align=\"center\" height=\"50\">General +5V Rules for Indicator LEDs and their Dropping Resistors<\/td>\n<\/tr>\n<tr>\n<td>\n<table border=\"0\" width=\"560\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#FFFFDD\" width=\"100\" height=\"80\">LED Color<\/td>\n<td align=\"center\" bgcolor=\"#FF3333\" width=\"75\" height=\"80\">RED<\/td>\n<td align=\"center\" bgcolor=\"#FF9900\" width=\"75\" height=\"80\">ORANGE<\/td>\n<td align=\"center\" bgcolor=\"#FFFF33\" width=\"75\" height=\"80\">YELLOW<\/td>\n<td align=\"center\" bgcolor=\"#99FF00\" width=\"75\" height=\"80\">GREEN<\/td>\n<td align=\"center\" bgcolor=\"#0099FF\" width=\"75\" height=\"80\">BLUE<\/td>\n<td align=\"center\" bgcolor=\"#FFFFFF\" width=\"75\" height=\"80\">WHITE<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#FFFFDD\" width=\"100\" height=\"80\">Nominal LED Voltage (DC)<\/td>\n<td align=\"center\" bgcolor=\"#FF3333\" width=\"75\" height=\"80\"><strong>1.5<\/strong><\/td>\n<td align=\"center\" bgcolor=\"#FF9900\" width=\"75\" height=\"80\"><strong>2.0<\/strong><\/td>\n<td align=\"center\" bgcolor=\"#FFFF33\" width=\"75\" height=\"80\"><strong>2.0<\/strong><\/td>\n<td align=\"center\" bgcolor=\"#99FF00\" width=\"75\" height=\"80\"><strong>2.5<\/strong><\/td>\n<td align=\"center\" bgcolor=\"#0099FF\" width=\"75\" height=\"80\"><strong>3.0<\/strong><\/td>\n<td align=\"center\" bgcolor=\"#FFFFFF\" width=\"75\" height=\"80\"><strong>3.5<\/strong><\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#FFFFDD\" width=\"100\" height=\"80\">Calculated Dropping Resistor Value (Ohms)<\/td>\n<td align=\"center\" bgcolor=\"#FF3333\" width=\"75\" height=\"80\"><strong>175<\/strong><\/td>\n<td align=\"center\" bgcolor=\"#FF9900\" width=\"75\" height=\"80\"><strong>150<\/strong><\/td>\n<td align=\"center\" bgcolor=\"#FFFF33\" width=\"75\" height=\"80\"><strong>150<\/strong><\/td>\n<td align=\"center\" bgcolor=\"#99FF00\" width=\"75\" height=\"80\"><strong>125<\/strong><\/td>\n<td align=\"center\" bgcolor=\"#0099FF\" width=\"75\" height=\"80\"><strong>100<\/strong><\/td>\n<td align=\"center\" bgcolor=\"#FFFFFF\" width=\"75\" height=\"80\"><strong>75<\/strong><\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#FFFFDD\" width=\"100\" height=\"80\">Nominal Dropping Resistor Value (Ohms)<\/td>\n<td align=\"center\" bgcolor=\"#FF3333\" width=\"75\" height=\"80\"><strong>200<\/strong><\/td>\n<td align=\"center\" bgcolor=\"#FF9900\" width=\"75\" height=\"80\"><strong>150<\/strong><\/td>\n<td align=\"center\" bgcolor=\"#FFFF33\" width=\"75\" height=\"80\"><strong>150<\/strong><\/td>\n<td align=\"center\" bgcolor=\"#99FF00\" width=\"75\" height=\"80\"><strong>150<\/strong><\/td>\n<td align=\"center\" bgcolor=\"#0099FF\" width=\"75\" height=\"80\"><strong>100<\/strong><\/td>\n<td align=\"center\" bgcolor=\"#FFFFFF\" width=\"75\" height=\"80\"><strong>100<\/strong><\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<td align=\"center\" bgcolor=\"#000000\" height=\"2\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>The LED\/resistor table was made specifically for use with +5 Volt <em>Arduino<\/em> boards. From the table, you can see that the smaller the voltage for a specific LED, the larger the Ohm value for its dropping resistor. The larger Ohm value of the dropping resistor, the greater voltage &#8216;dropped&#8217; across that resistor.<\/p>\n<p>For our purpose, a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Resistor\" target=\"_new\" rel=\"noopener noreferrer\">1\/4 Watt axial leaded resistor<\/a> should work just fine. This dropping resistor needs to be rated at a 1\/4 watt to handle the electrical power going through it. And, its lead thickness is good for plugging into the headers of the <em>UNO<\/em>.<\/p>\n<p>Look back at the LED\/resistor table, notice there are five different calculated dropping resistor Ohm values. From an electronics engineering viewpoint and in practical use, only three nominal Ohm values are needed: 200, 150, and 100 Ohm. This is because the calculated Ohm values are close enough to the nominal values when lighting discrete indicator-type LEDs.<\/p>\n<p>From a literal human viewpoint, due to the way we humans perceive brightness it is hard for us to even notice the slight change in brightness; when we use a near value resistor versus the calculated value when lighting a LED. This is an example of the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Inverse-square_law\" target=\"_new\" rel=\"noopener noreferrer\">inverse-square law of light<\/a> in effect with <a href=\"https:\/\/en.wikipedia.org\/wiki\/Human_eye\" target=\"_new\" rel=\"noopener noreferrer\">human eye physiology<\/a>.<\/p>\n<p>The LED\/resistor table shows both actual calculated values and nominal values. The calculated values are real values, whereas the nominal values are easily chosen close values, either for convenience or practical availability. In this case, calculated resistor values are based on useful nominal voltage values for each LED color.<\/p>\n<p><strong><br \/>\n<u> Calculate Dropping Resistors Values for Your Own LEDs<\/u><\/strong><\/p>\n<p><strong>HINT 1:<\/strong> Remember, even if you calculate the actual dropping resistor value, you may only be able to easily purchase a close nominal value.<\/p>\n<p><strong>HINT 2:<\/strong> In the case of round-up to the neared available nominal value, you can see from the LED\/resistor table and its explanations that an increased difference of even 25 Ohms won\u2019t make any practical difference.<\/p>\n<p><strong>HINT 3:<\/strong> We\u2019ve had great luck and even better results with (and <strong>l-o-v-e) <\/strong>&#8216;Gumdrop LEDs&#8217;. Use your favorite search engine if you want to find them.<\/p>\n<p>You may either use the table provided as a practical reference, or you may choose to calculate the actual dropping resistor value (<strong>Rdrop<\/strong>) for your own LED. If you wish to calculate the actual value of you own dropping resistor, start by using the operating voltage of your <em>UNO<\/em>. Additionally, you will need to know the following:<\/p>\n<ul type=\"disc\">\n<li>Voltage In (<strong>Vin<\/strong>) <strong><br \/>\n<\/strong>This value is 5.0 for five volt <em>UNO<\/em> boards.<\/li>\n<li>LED Voltage (<strong>Vled<\/strong>)<br \/>\nSee the seller\u2019s specifications.<\/li>\n<li>LED Current (<strong>Iled<\/strong>)<br \/>\nSee the seller\u2019s specifications.<\/li>\n<\/ul>\n<p>The following formula is based on <a href=\"https:\/\/en.wikipedia.org\/wiki\/Ohm%27s_law\" target=\"_new\" rel=\"noopener noreferrer\">Ohm\u2019s Law<\/a>. Use the actual values above in the formula below:<\/p>\n<p><strong>Rdrop<\/strong> = (<strong>Vin<\/strong> \u2013 <strong>Vled<\/strong>) \/ <strong>Iled<\/strong><\/p>\n<p>When reviewing manufacturer\u2019s specification, you many need to substitute the following technical names in the formula below:<\/p>\n<ul type=\"disc\">\n<li>Voltage In (<strong>Vin<\/strong>)<br \/>\nThis value is 5.0 for five volt UNO boards.<\/li>\n<li>LED Voltage (<strong>Vf<\/strong>)<br \/>\nSee the manufacturer\u2019s specifications.<\/li>\n<li>LED Current (<strong>If<\/strong>)<br \/>\nSee the manufacturer\u2019s specifications.<\/li>\n<\/ul>\n<p><strong>R<\/strong> = (<strong>Vin<\/strong> \u2013 <strong>Vf<\/strong>) \/ <strong>If<\/strong><\/p>\n<p>If you chose to perform the dropping resistor calculation (<strong>Rdrop<\/strong> or <strong>R<\/strong>), why not use your <em>UNO<\/em>?<\/p>\n<p>Enter the following sketch into your <em>UNO<\/em> to easily calculate the value of Rdrop or R.<\/p>\n<p><strong>NOTE 1:<\/strong> This program has been released under GPL. Freely use and modify the <strong>CalcLEDDropResist<\/strong> sketch.<\/p>\n<p><strong>NOTE 2<\/strong>: In order to use communication via the Serial Monitor window, you will need to keep a USB cable connected between your computer and your <em>UNO<\/em>.<\/p>\n<p>The <strong>Calc_LED_Drop_Resist.INO<\/strong> sketch is a simple Ohm\u2019s Law calculator\/solver for single resistor\/LED combinations.<\/p>\n<p>Open the <em>Arduino<\/em> application and copy\/paste the following sketch over the entire staring program in a new sketchbook window. Save the sketch as <strong>Calc_LED_Drop_Resist.INO<\/strong>. For information on how to do this, see <strong>Intro to Arduino<\/strong>.<\/p>\n<div align=\"center\">\n<table border=\"0\" width=\"560\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n<tbody>\n<tr>\n<td bgcolor=\"#FFFFEE\">\/* CalcLEDDropResist.INO<br \/>\nTodd Andersen<br \/>\n06-JAN-17This sketch requests users to enter specific values in the Serial Monitor<br \/>\nThose values are used to calculate the value of the LED Dropping ResistorDropping Resistor Value (Rdrop)<br \/>\nVoltage In (Vin)<br \/>\nLED Voltage (Vled)<br \/>\nLED Current (Iled)<br \/>\nR = (Vin \u2013 Vled) \/ Iled<br \/>\n*\/#include &#8220;math.h&#8221; \/\/ Include the Math Library<br \/>\nfloat Vin;<br \/>\nfloat Vled;<br \/>\nfloat Iled;<br \/>\nfloat Rdrop;<br \/>\nchar junk = &#8216; &#8216;;void setup(){ \/\/ Setup sketch<br \/>\nSerial.begin(9600); \/\/ Serial Terminal baud (9600 bps)<br \/>\nSerial.println(&#8220;&#8221;);<br \/>\nSerial.flush();<br \/>\n}void loop(){ \/\/ Calculate Rdrop<br \/>\nSerial.println(&#8220;Calculate the value for your Dropping Resistor, &#8216;Rdrop'&#8221;);<br \/>\nSerial.println(&#8220;Enter the voltage for &#8216;Vin&#8217;, Press ENTER&#8221;);<br \/>\nwhile (Serial.available()==0); \/\/ Wait here until input buffer has a character<br \/>\n{<br \/>\nVin = Serial.parseFloat(); \/\/ Input Vin<br \/>\nSerial.print(&#8220;Vin = &#8220;); Serial.println(Vin,DEC\/10);<br \/>\nwhile (Serial.available()&gt;0) \/\/ Serial.parseFloat(), User input<br \/>\n{junk = Serial.read();} \/\/ Clear keyboard buffer<br \/>\n}Serial.println(&#8220;Enter the voltage for &#8216;Vled&#8217;, Press ENTER&#8221;);<br \/>\nwhile (Serial.available()==0);<br \/>\n{<br \/>\nVled = Serial.parseFloat(); \/\/ Input Vled<br \/>\nSerial.print(&#8220;Vled = &#8220;); Serial.println(Vled,DEC\/10);<br \/>\nwhile (Serial.available()&gt;0)<br \/>\n{junk = Serial.read();}<br \/>\n}Serial.println(&#8220;Enter the milliamps for &#8216;Iled&#8217;, Press ENTER&#8221;);<br \/>\nwhile (Serial.available()==0);<br \/>\n{<br \/>\nIled = Serial.parseFloat(); \/\/ Input Iled<br \/>\nSerial.print(&#8220;Iled = &#8220;); Serial.println(Iled,DEC\/10);<br \/>\nwhile (Serial.available()&gt;0)<br \/>\n{junk = Serial.read();}<br \/>\n}Rdrop = ((float(Vin-Vled)\/Iled)*1000);Serial.print(&#8220;Dropping Resistor = &#8220;);<br \/>\nSerial.print(Rdrop,(DEC\/100));<br \/>\nSerial.println(&#8221; Ohms&#8221;);<br \/>\nSerial.println(&#8220;&#8221;);<br \/>\nSerial.println(&#8220;&#8221;);<br \/>\n}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>You should see something similar to the following:<\/p>\n<figure style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/shows\/2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"ImageBorder\" src=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/shows\/2.jpg\" alt=\"The CalcLEDDropResist.ino sketch\" width=\"550\" height=\"609\" \/><\/a><figcaption class=\"wp-caption-text\">The CalcLEDDropResist.ino sketch<\/figcaption><\/figure>\n<p>Use your <em>UNO<\/em> to calculate dropping resistor values:<\/p>\n<ul type=\"disc\">\n<li>Click the magnifying glass in the upper right corner of the sketchbook window<\/li>\n<li>A Serial Monitor window will open<\/li>\n<li>Follow the on-screen instructions<\/li>\n<li>Enter the requested values in the top line<\/li>\n<\/ul>\n<figure style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"ImageBorder\" src=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/3.jpg\" alt=\"The Serial Monitor window\" width=\"500\" height=\"340\" \/><\/a><figcaption class=\"wp-caption-text\">The Serial Monitor window<\/figcaption><\/figure>\n<p>Use the specific values from the Manufacturer\u2019s specifications:<\/p>\n<ul type=\"disc\">\n<li>Enter all the requested values: <strong>Vin<\/strong>, <strong>Vled <\/strong>and <strong>Iled<\/strong><\/li>\n<li>The dropping resistor value will be given with the last &#8216;Press ENTER&#8217;<\/li>\n<\/ul>\n<p><strong>NOTE:<\/strong> The sketch will then automatically reset; for you to calculate as many dropping resistor values as you need.<\/p>\n<figure style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/4.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"ImageBorder\" src=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/4.jpg\" alt=\"The dropping resistor value\" width=\"500\" height=\"340\" \/><\/a><figcaption class=\"wp-caption-text\">The dropping resistor value<\/figcaption><\/figure>\n<p><strong><u>Making your Connections<\/u><\/strong><\/p>\n<p>In the end, programming comes down to just ones (1s) and zeros (0s). Due to limitations such as these, programmers must find creative solutions to complete their projects.<\/p>\n<p>One creative solution can save us from having to solder. That solution is to use a clever combination of (2.54mm \/ 0.1 inch DuPont connector) male and female jumper cables.<\/p>\n<p>The right combination of a variety of jumper cables works surprisingly well, using a little hot glue to shore up each junction.<\/p>\n<p>The following pictures show such DuPont jumper cables, on their own and in use.<\/p>\n<figure style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/5.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"ImageBorder\" src=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/5.jpg\" alt=\"Dupont jumper cables\" width=\"550\" height=\"458\" \/><\/a><figcaption class=\"wp-caption-text\">Dupont jumper cables<\/figcaption><\/figure>\n<figure style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/6.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"ImageBorder\" src=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/6.jpg\" alt=\"Male and female jumpers\" width=\"550\" height=\"362\" \/><\/a><figcaption class=\"wp-caption-text\">Male and female jumpers<\/figcaption><\/figure>\n<figure style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/7.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"ImageBorder\" src=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/7.jpg\" alt=\"Using jumper cables to connect the LED\" width=\"550\" height=\"359\" \/><\/a><figcaption class=\"wp-caption-text\">Using jumper cables to connect the LED<\/figcaption><\/figure>\n<p><em>UNO<\/em> Board LED\/Resistor Jumper Cable:<\/p>\n<ul type=\"disc\">\n<li>Plug one end of your dropping resistor into the &#8216;GND&#8217; pin, near pin &#8217;11&#8217;<\/li>\n<li>Plug the other end of your dropping resistor into one end of a jumper cable with female to female ends<\/li>\n<li>Use a second jumper cable with male to female ends to connect between the first jumper cable and one lead of your LED<\/li>\n<li>Use a third jumper cable with two female ends to plug into the other lead of your LED<\/li>\n<li>Use a fourth jumper cable with two male ends to connect between the third jumper cable and pin &#8217;11&#8217;<\/li>\n<\/ul>\n<p><strong>TROUBLESHOOTING:<\/strong> If your LED does not light after you run your <em>UNO<\/em> sketch, simply turn around the LED.<\/p>\n<figure style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/8.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"ImageBorder\" src=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/8.jpg\" alt=\"LED connections to the UNO\" width=\"550\" height=\"431\" \/><\/a><figcaption class=\"wp-caption-text\">LED connections to the UNO<\/figcaption><\/figure>\n<p>LDR on the <em>UNO<\/em> board:<\/p>\n<ul type=\"disc\">\n<li>Plug one end of the LDR, into the &#8216;GND&#8217; pin<\/li>\n<li>Plug the other end of the LDR, into pin &#8216;AO&#8217;<\/li>\n<li>Plug one end of the 10 KOhm resistor into pin &#8216;AO&#8217;<\/li>\n<li>Plug the other end of the 10 KOhm resistor, into pin &#8216;5V&#8217;<\/li>\n<\/ul>\n<p><strong>NOTE:<\/strong> You may also remotely mount the LDR on jumper cables, although it may be best to keep it on the <em>UNO<\/em> board.<\/p>\n<figure style=\"width: 400px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/9.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"ImageBorder\" src=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/9.jpg\" alt=\"Mounting the LDR and 10K resistor\" width=\"400\" height=\"608\" \/><\/a><figcaption class=\"wp-caption-text\">Mounting the LDR and 10K resistor<\/figcaption><\/figure>\n<p><strong>IMPORTANT NOTE:<\/strong> When you are all done with wiring and programming, be sure to put your microcontroller LDR into a project box or use some other means to ensure your <em>UNO<\/em> project and its components don\u2019t short to anything.<\/p>\n<p><u><strong>Upload the pin_uino.INO Sketch<\/strong><\/u><\/p>\n<p><strong>NOTE 1:<\/strong> This program has been released under GPL. Freely use and modify the <strong>pin_uino<\/strong> sketch.<\/p>\n<p><strong>NOTE 2<\/strong>: In order to use communication via the Serial Monitor window, you will need to keep a USB cable connected between your computer and your <em>UNO<\/em>.<\/p>\n<p>The <strong>pinUino.INO<\/strong> sketch turns on a single LED when the value read from the LDR is above a certain threshold, eg. during normal game play, when all the GI lights of your pinball machine are lit.<\/p>\n<p>Open the <em>Arduino<\/em> application and copy\/paste the following sketch over the entire staring program in a new sketchbook window. Save the sketch as <strong>pin_uino.INO<\/strong>. For information on how to do this, see <a href=\"http:\/\/www.pinballnews.com\/learn\/pinduino\/index2.html\" target=\"_new\" rel=\"noopener noreferrer\"><strong>Intro to Arduino<\/strong><\/a>.<\/p>\n<div align=\"center\">\n<table border=\"0\" width=\"560\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n<tbody>\n<tr>\n<td bgcolor=\"#FFFFEE\">\/*<br \/>\n<strong>pin_uino.INO<\/strong><br \/>\nTodd Andersen<br \/>\n01-JAN-17This example demonstrates the use of an \u201cif (then) \/ else\u201d statement.<br \/>\nIt reads the state of an LDR (an analog input) and turns on a LED.<br \/>\nIt prints the analog value regardless of any software or hardware inputs.The circuit:<br \/>\nThe LDR is connected between AO and GND<br \/>\nThe 10 KOhm Resistor is connected between AO and 5V<br \/>\nThe LED is connected, through a dropping resistor, between pin 11 and GND<br \/>\n*\/\/\/ Constants to set up sketch parameters<br \/>\nconst int analogPin1 = A0;\u00a0\u00a0 \/\/ Pin that the sensor is attached<br \/>\nconst int analogValue;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ Value from sensor pins<br \/>\nconst int ledPin1 = 11;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ pin that the LED is attached<br \/>\nconst int threshold = 500;\u00a0\u00a0\u00a0\u00a0 \/\/ threshold level in the range of the LDR in usevoid setup(){<br \/>\n\/\/ initialize the LED pin as an output<br \/>\npinMode(ledPin1, OUTPUT);<br \/>\n\/\/ initialize serial communications<br \/>\nSerial.begin(9600);<br \/>\n}void loop(){<br \/>\n\/\/ Read the value of the LDR<br \/>\nint analogValue = (analogRead (analogPin1));\/\/ If the analog value is high enough, turn on the LED<br \/>\nif (analogValue &gt; threshold )<br \/>\n{digitalWrite(ledPin1, HIGH);}<br \/>\nelse {digitalWrite(ledPin1, LOW);}\/\/ print the analog value<br \/>\nSerial.println(analogValue);<br \/>\ndelay(250);<br \/>\n}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>You should see something similar to the following:<\/p>\n<figure style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/10.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"ImageBorder\" src=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/10.jpg\" alt=\"The pin_uino sketch\" width=\"550\" height=\"609\" \/><\/a><figcaption class=\"wp-caption-text\">The pin_uino sketch<\/figcaption><\/figure>\n<p>LDR practical values:<\/p>\n<ul type=\"disc\">\n<li>Upload the program to your <em>UNO<\/em><\/li>\n<li>Click the magnifying glass in the upper right corner of the sketchbook window<\/li>\n<li>A new Serial Monitor window will open<\/li>\n<li>Change the amount of light falling on the LDR<\/li>\n<li>Vary that the readings change in the Serial Monitor window<\/li>\n<\/ul>\n<p><strong>NOTE<\/strong>: These reading can give you some idea of the useful range values of your specific LDR.<\/p>\n<figure style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/11.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"ImageBorder\" src=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/11.jpg\" alt=\"The LDR readings\" width=\"550\" height=\"307\" \/><\/a><figcaption class=\"wp-caption-text\">The LDR readings<\/figcaption><\/figure>\n<p><strong>IMPORTANT NOTE: <\/strong>When you are all done with wiring and programming, be sure to put your microcontroller LDR into a project box. Or, use some other means to ensure your <em>Arduino<\/em> project and its components don\u2019t short to anything.<\/p>\n<p><strong>TROUBLESHOOTING<\/strong>: If your LED doe not light after you run your <em>UNO<\/em> sketch, simply turn around the LED.<\/p>\n<p><strong><u>Software vs. Hardware<\/u><\/strong><\/p>\n<p>One advantage of using a microcontroller is the ease of using software changes over hardware changes.<\/p>\n<p>Keeping the same hardware configuration, you can make the LED turn off when a certain value is read from the LDR. eg. during &#8216;blackout&#8217; mode, just before multiball mode. Simply change one number in your software. Unlike in the other two articles mentioned at the beginning of this article, there is no need to rewire components.<\/p>\n<p>To change from <strong>Light Sensing<\/strong> to <strong>Dark Sensing<\/strong>, simply change the <strong>greater<\/strong>-than sign in:<\/p>\n<div align=\"center\">\n<table border=\"0\" width=\"560\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n<tbody>\n<tr>\n<td bgcolor=\"#FFFFEE\">if (analogValue &gt; threshold )<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>to a <strong>less<\/strong>-than sign:<\/p>\n<div align=\"center\">\n<table border=\"0\" width=\"560\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n<tbody>\n<tr>\n<td bgcolor=\"#FFFFEE\">if (analogValue &lt; threshold )<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Don\u2019t forget to also change your comment from:<\/p>\n<div align=\"center\">\n<table border=\"0\" width=\"560\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n<tbody>\n<tr>\n<td bgcolor=\"#FFFFEE\">\/\/ If the analog value is high enough, turn on the LED<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>to:<\/p>\n<div align=\"center\">\n<table border=\"0\" width=\"560\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n<tbody>\n<tr>\n<td bgcolor=\"#FFFFEE\">\/\/ If the analog value is low enough, turn on the LED<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Is the LED changing states not quite as you expected?<\/p>\n<p>Simply change the number value of the threshold in:<\/p>\n<table border=\"0\" width=\"560\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n<tbody>\n<tr>\n<td bgcolor=\"#FFFFEE\">const int threshold = 500;\u00a0\u00a0\u00a0\u00a0 \/\/ threshold level in the range of the LDR in use<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>to adjust the event threshold.<\/p>\n<ul type=\"disc\">\n<li>A <strong>lesser<\/strong> value will create a <strong>lower<\/strong> threshold (trip point)<\/li>\n<li>A <strong>greater<\/strong> value will create a <strong>higher<\/strong> threshold (trip point)<\/li>\n<\/ul>\n<p><strong>NOTE 1<\/strong>: The values from the Serial Monitor can help you select a useable threshold.<\/p>\n<p><strong>NOTE 2<\/strong>: Almost any LDR can be used with an adjustment in software.<\/p>\n<p><strong><u><br \/>\nBoring . . . what else can I program my microcontroller to make the LED do?<\/u><\/strong><\/p>\n<p>You can make the LED blink, flash, fade, and perform other visual effects. Use the built-in examples of the <em>Arduino<\/em> software, and the built-in LED of the <em>UNO<\/em> board to see some of the ways you can light an LED. Be sure to explore all the built-in examples, not just &#8216;Blink&#8217;.<\/p>\n<p>Navigate (drill down) to: <em>File Examples 01.Basics Blink<\/em><\/p>\n<figure style=\"width: 400px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/12.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"ImageBorder\" src=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/12.jpg\" alt=\"The 'Blink' example\" width=\"400\" height=\"600\" \/><\/a><figcaption class=\"wp-caption-text\">The &#8216;Blink&#8217; example<\/figcaption><\/figure>\n<p><strong><u>Where do I get programs to use with my project?<\/u><\/strong><\/p>\n<p>Now may be the time for you to start writing your own sketches. However, one last sketch is included with this article: <strong><br \/>\nConditional_If_Statements_with_Hysteresis.INO<\/strong>.<\/p>\n<p>This sketch lights two LEDs, one for each of two different conditions.<\/p>\n<p><strong>NOTE 1:<\/strong> The potentiometer may be replaced with a LDR<\/p>\n<p><strong>NOTE 2:<\/strong> Move the jumper side of the LED in the previous set up from pin &#8217;11&#8217; to pin &#8216;9&#8217;.<\/p>\n<p><strong>NOTE 3 <\/strong> In order to use communication via the Serial Monitor window, you will need to keep a USB cable connected between your computer and your <em>UNO<\/em>.<\/p>\n<p><strong>NOTE 4:<\/strong> Use the resources previously mentioned in this article for help.<\/p>\n<p><strong>NOTE 5:<\/strong> This program has been released under GPL. Freely use and modify the <strong>Conditional_If_Statements_with_Hysteresis<\/strong> sketch.<\/p>\n<p>Put the following sketch in a new sketchbook window. Save the sketch as <strong>Conditional_If_Statements_with_Hysteresis.INO<\/strong> and view the Serial Monitor window as previously shown in this article.<\/p>\n<div align=\"center\">\n<table border=\"0\" width=\"560\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n<tbody>\n<tr>\n<td bgcolor=\"#FFFFEE\">\/*<br \/>\n<strong>Conditional_If_Statements_with_Hysteresis.INO<\/strong>This example demonstrates the use of if (then) \/ else statements.<br \/>\nIt reads the state of a potentiometer (an analog input) and turns on LEDs.<br \/>\nIt prints the analog value regardless of the level.The circuit:<br \/>\n* potentiometer connected to analog pin 0.<br \/>\nCenter pin of the potentiometer goes to the analog pin.<br \/>\nside pins of the potentiometer go to +5V and ground<br \/>\n* 1st LED connected, through a dropping resistor, from digital pin 9 to ground<br \/>\n* 2nd LED connected, through a dropping resistor, from digital pin 13 to ground<br \/>\n* Note: On most Arduino boards, there is already an LED on the board connected to pin 13, so you don&#8217;t need any extra components to use that LEDcreated 17 Jan 2009<br \/>\nmodified 9 Apr 2012<br \/>\nby Tom Igoe<br \/>\nmodified 19 Oct 2016<br \/>\nby Todd AndersenThis example code is in the public domain.http:\/\/www.arduino.cc\/en\/Tutorial\/IfStatement*\/\/\/ These constants won&#8217;t change:<br \/>\nconst int analogPin = A0;\u00a0\u00a0\u00a0 \/\/ pin that the sensor is attached to<br \/>\nconst int ledPin1 = 9;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\/\/ pin that the 1st LED is attached to<br \/>\nconst int ledPin2 = 13;\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\/\/ pin that the 2nd LED is attached to<br \/>\nconst int threshold = 500;\u00a0\u00a0 \/\/ an arbitrary threshold level that&#8217;s in the range of the analog input<br \/>\nconst int hysteresis = 5;\u00a0\u00a0\u00a0 \u00a0\u00a0\/\/ an arbitrary hysteresis levelvoid setup() {<br \/>\n\/\/ initialize the LED pin as an output:<br \/>\npinMode(ledPin1, OUTPUT);<br \/>\npinMode(ledPin2, OUTPUT);<br \/>\n\/\/ initialize serial communications:<br \/>\nSerial.begin(9600);<br \/>\n}void loop() {<br \/>\n\/\/ read the value of the potentiometer:<br \/>\nint analogValue = analogRead(analogPin);\/\/ if the analog value is high enough, turn on the 1st LED:<br \/>\nif (analogValue &gt; threshold + hysteresis) {<br \/>\ndigitalWrite(ledPin1, HIGH);<br \/>\n} else {<br \/>\ndigitalWrite(ledPin1, LOW);<br \/>\n}\/\/ if the analog value is low enough, turn on the 2nd LED:<br \/>\nif (analogValue &lt; threshold &#8211; hysteresis) {<br \/>\ndigitalWrite(ledPin2, HIGH);<br \/>\n} else {<br \/>\ndigitalWrite(ledPin2, LOW);<br \/>\n}\/\/ print the analog value:<br \/>\nSerial.println(analogValue);<br \/>\ndelay(250);\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ delay in between reads for stability<br \/>\n}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Luckily for us, <em>Arduino<\/em> is open source. Just use your favorite search engine to search for example programs, additional help and other useful resources.<\/p>\n<p><strong><u><br \/>\nMust my <em>UNO<\/em> Stay Plugged into my Computer?<\/u><\/strong><\/p>\n<p>Once programmed, your <em>Arduino<\/em> can continuously run a loaded sketch without your computer. Just apply the proper power.<\/p>\n<p>To power a project needing 1 Amp or less of peak current, you can use a spare USB cable (like you used to program your <em>UNO<\/em>) and an AC\/DC (+5 Volt DC @ 2 Amp) USB phone charger. See the following picture of a custom holiday pinball topper.<\/p>\n<p>USB Phone Charger to Project:<\/p>\n<ul type=\"disc\">\n<li>Plug the charger into: an extension cord, a nearby wall outlet, or your pinball machine\u2019s utility jack.<\/li>\n<li>Plug the USB cord between the charger and your <em>UNO<\/em> project.<\/li>\n<\/ul>\n<figure style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/13.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"ImageBorder\" src=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/13.jpg\" alt=\"\u201cIt\u2019s a major award!\u201d\" width=\"550\" height=\"412\" \/><\/a><figcaption class=\"wp-caption-text\">\u201cIt\u2019s a major award!\u201d<\/figcaption><\/figure>\n<p>To power a more power-hungry project, use a Positive 9 to 12 Volt <strong>D<\/strong>irect <strong>C<\/strong>urrent (<strong>DC<\/strong>) power supply; rated at twice the estimated peak current of your project. For several <em>Arduino<\/em> boards, including the <em>UNO<\/em>, that power supply will need to have a 2.1 mm center-positive plug; which friction fits into the board&#8217;s power jack.<\/p>\n<p><strong><u><br \/>\nSo where can I get one of these awesome microcontrollers and make my own pin-\u2018Uino project?<\/u><\/strong><\/p>\n<p>This article introduced you to the <em>Arduino<\/em>\/<em>Genuino UNO<\/em>. This microcontroller has several different &#8216;flavours&#8217; and &#8216;shrinkified&#8217; versions. Use your favorite search engine and the links at the end of this article to learn about different boards and where to purchase them.<\/p>\n<p><strong><u><br \/>\nAdd-ons<\/u><\/strong><\/p>\n<p>There are many useful add-ons for the <em>UNO<\/em>. These add-ons may help you in the learning and prototyping stages, and may even keep you from having to solder your final project.<\/p>\n<p>A board which plugs directly into the <em>UNO<\/em> main board is called a &#8216;shield&#8217;. To name just a few, there are: <em>Breadboard Shield<\/em> (for directly plugging in discrete components), <em>LED Shield<\/em> (for multiple and\/or multi-color LEDs), <em>Motor Shield<\/em> (for driving different motors), and <em>Relay Shield<\/em> (for controlling power to other devices).<\/p>\n<p>Use your favorite search engine and the links at the end of this article to learn about different shields and where to purchase them. Any type of shield can usually be purchased preassembled. If you buy your shield as a kit, you can assemble it yourself and use the experience to practice <a href=\"http:\/\/www.pinballnews.com\/learn\/soldering\/index.html\" target=\"_new\" rel=\"noopener noreferrer\">soldering<\/a>.<\/p>\n<p>Pictured below is a <em>Breadboard Shield<\/em>.<\/p>\n<figure style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/14.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"ImageBorder\" src=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/14.jpg\" alt=\"The Breadboard Shield\" width=\"550\" height=\"376\" \/><\/a><figcaption class=\"wp-caption-text\">The Breadboard Shield<\/figcaption><\/figure>\n<p><strong>What Else is Available for my <em>UNO<\/em>?<\/strong><\/p>\n<p>There are learning kits, project cases and various modules available for many <em>Arduino\/Genuino<\/em> boards; not just the <em>UNO<\/em>.<\/p>\n<p>This next example shows a 5 Volt <em>Arduino\/Genuino<\/em> compatible module; a discrete RGB LED called <em>NeoPixel<\/em>. The <em>NeoPixel<\/em> has its own built it microcontroller and it can utilize &#8216;Libraries&#8217;. Libraries are sketches, put together by people from the <em>Arduino\/Genuino<\/em> community to help make programming easier. The NeoPixel and Libraries are only mentioned in this introductory article to show just a tiny bit more of what you can do. Use your favorite search engine and the links at the end of this article to learn about different modules and where to purchase them.<\/p>\n<p>Pictured below is a <em>UNO\/NeoPixel<\/em> cycling through different colors and brightness levels. As the peak current requirements of this combination are only about 80 mA, a battery powered 1 Amp phone charger can easily power this set up for an entire night.<\/p>\n<figure style=\"width: 400px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/15.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"ImageBorder\" src=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/15.jpg\" alt=\"The UNO driving a NeoPixel\" width=\"400\" height=\"900\" \/><\/a><figcaption class=\"wp-caption-text\">The UNO driving a NeoPixel<\/figcaption><\/figure>\n<p><strong><u>Built-In Help<\/u><\/strong><\/p>\n<p>Lucky for us, the <em>Arduino<\/em> software has built in help. Also, be sure to &#8216;<strong>Visit Arduino.cc<\/strong>&#8216;.<\/p>\n<p>Navigate to: <em>HelpUser Chosen Section<\/em><\/p>\n<figure style=\"width: 514px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/16.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"ImageBorder\" src=\"https:\/\/www.pinballnews.com\/site\/wp-content\/uploads\/learn\/pin-uino\/16.jpg\" alt=\"The Arduino Help section\" width=\"514\" height=\"616\" \/><\/a><figcaption class=\"wp-caption-text\">The Arduino Help section<\/figcaption><\/figure>\n<p><strong><br \/>\n<u>Buy and Learn About Microcontroller Stuff from the Usual Suspects<\/u><\/strong><\/p>\n<ul>\n<li><strong>Adafruit<\/strong>: <a href=\"https:\/\/www.adafruit.com\/category\/17?gclid=CNb76vD6ktECFdW4wAodw1sByQ\" target=\"_new\" rel=\"noopener noreferrer\">https:\/\/www.adafruit.com\/category\/17?gclid=CNb76vD6ktECFdW4wAodw1sByQ<\/a><\/li>\n<li><strong>DigiKey<\/strong>:<br \/>\n<a href=\"http:\/\/www.digikey.com\/products\/en?keywords=arduino\" target=\"_new\" rel=\"noopener noreferrer\">http:\/\/www.digikey.com\/products\/en?keywords=arduino<\/a><\/li>\n<li><strong>eBay<\/strong> (for your country)<\/li>\n<li><strong>Evil Mad Scientist<\/strong>:<br \/>\n<a href=\"http:\/\/shop.evilmadscientist.com\/search-main?q=arduino\" target=\"_new\" rel=\"noopener noreferrer\">http:\/\/shop.evilmadscientist.com\/search-main?q=arduino<\/a><\/li>\n<li><strong>Local electronics and\/or computer stores<br \/>\n<\/strong><\/li>\n<li><strong>Maplin Electronics<\/strong>:<br \/>\n<a href=\"http:\/\/www.maplin.co.uk\/c\/gadgets-toys-and-hobbies\/projects-kits-and-modules\/arduino-boards\" target=\"_new\" rel=\"noopener noreferrer\">http:\/\/www.maplin.co.uk\/c\/gadgets-toys-and-hobbies\/projects-kits-and-modules\/arduino-boards<\/a><\/li>\n<li><strong>SparkFun<\/strong>:<br \/>\n<a href=\"https:\/\/www.sparkfun.com\/search\/results?term=Arduino\" target=\"_new\" rel=\"noopener noreferrer\">https:\/\/www.sparkfun.com\/search\/results?term=Arduino<\/a><\/li>\n<li><strong>The Official Arduino store<\/strong>:<br \/>\n<a href=\"https:\/\/store-usa.arduino.cc\/\" target=\"_new\" rel=\"noopener noreferrer\">https:\/\/store-usa.arduino.cc\/<\/a><\/li>\n<li>and many other places.<\/li>\n<\/ul>\n<p><u><br \/>\n<strong>Your pin-\u2018Uino Projects<\/strong><\/u><\/p>\n<p>Sorry, but <a href=\"http:\/\/www.pinballnews.com\/\" target=\"_new\" rel=\"noopener noreferrer\">Pinball News<\/a> does not provide <em>Arduino\/Genuino<\/em> support. However, we\u2019d love to <a href=\"http:\/\/www.pinballnews.com\/response\/index.html\" target=\"_new\" rel=\"noopener noreferrer\">hear about and see<\/a> your projects.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is a pin-\u2018Uino? The term is a portmanteau of the words pinball and Arduino. As you are probably reading this article in Pinball News&#8217;s Learn How section, you may be familiar with pinball machines. However, you may not be familiar with the Arduino. Arduino is an open-source platform for ATmega 168 and 328 microcontrollers. &hellip;<\/p>\n","protected":false},"author":2,"featured_media":2693,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[148,150,149],"class_list":["post-2680","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-learn","tag-arduino","tag-controller","tag-led"],"_links":{"self":[{"href":"https:\/\/www.pinballnews.com\/site\/wp-json\/wp\/v2\/posts\/2680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pinballnews.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pinballnews.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pinballnews.com\/site\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pinballnews.com\/site\/wp-json\/wp\/v2\/comments?post=2680"}],"version-history":[{"count":10,"href":"https:\/\/www.pinballnews.com\/site\/wp-json\/wp\/v2\/posts\/2680\/revisions"}],"predecessor-version":[{"id":18692,"href":"https:\/\/www.pinballnews.com\/site\/wp-json\/wp\/v2\/posts\/2680\/revisions\/18692"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pinballnews.com\/site\/wp-json\/wp\/v2\/media\/2693"}],"wp:attachment":[{"href":"https:\/\/www.pinballnews.com\/site\/wp-json\/wp\/v2\/media?parent=2680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pinballnews.com\/site\/wp-json\/wp\/v2\/categories?post=2680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pinballnews.com\/site\/wp-json\/wp\/v2\/tags?post=2680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}