{"id":224,"date":"2015-10-12T23:03:58","date_gmt":"2015-10-12T23:03:58","guid":{"rendered":"https:\/\/einhugur.com\/blog\/?page_id=224"},"modified":"2016-05-19T22:03:48","modified_gmt":"2016-05-19T22:03:48","slug":"working-with-leds-and-wiring-4-pin-rgb-led-to-raspberry-pi","status":"publish","type":"page","link":"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/working-with-leds-and-wiring-4-pin-rgb-led-to-raspberry-pi\/","title":{"rendered":"Working with LED&#8217;s &#8211; And Wiring 4 pin RGB led to Raspberry PI"},"content":{"rendered":"<h2>In this example we are going\u00a0learn some basics on how to calculate the resistor for LED, and we will take a look at how to wire up a 4 pin RGB LED.<\/h2>\n<p><strong>Disclaimer:<\/strong><br \/>\nWe do not take any responsibility for possible errors in the guide or errors that you might do wiring it up. Incorrect wiring can result in damaged sensor or damaged Raspberry PI.<\/p>\n<h5><strong>Pieces we use are:<\/strong><\/h5>\n<ul>\n<li>Raspberry PI 2 or Raspberry PI 3<\/li>\n<li>Cobbler and Cobbler cable<\/li>\n<li>Bread board (Big one and mini breadboard but the big one would be enough)<\/li>\n<li>4 pin RGB LED.<\/li>\n<li>Some resistors (types depend on spec of your RGB led)<\/li>\n<li>We are going to be using digital multi-meter to verify the spec of the LED and to verify our calculations. But if you know the specs of your LED for sure then you will not be needing this.\u00a0<span style=\"color: #808080;\">(Digital multimeter is really one of the first things you should have if you are going to be playing around with electronics. Their cheap you can get good one for around $15 to $20. Mine was bought in Kiel in Germany right at the time when the endless lines of\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Trabant\" target=\"_blank\">Trabants<\/a> started to flow from East Germany to the West, so they really can last you for long time)<\/span><\/li>\n<li><a href=\"https:\/\/github.com\/xojo\/GPIO\">Wiring PI Xojo module from\u00a0Paul Lefebvre<\/a> <span style=\"color: #999999;\">(Note we will be making modifications for the interrupts example)<\/span><\/li>\n<\/ul>\n<hr \/>\n<p><strong>If you are not familiar with breadboards, how to place a cobbler on the breadboard or need to know how to read the color codings on the resistors then click here bellow<\/strong><\/p>\n<p><a class=\"mb-button mb-style-glass mb-size-small mb-corners-default mb-text-style-default \" style=\"background-color: #2b7dc4;\" href=\"https:\/\/einhugur.com\/blog\/index.php\/understanding-your-breadboard-and-placement-of-raspberry-cobbler\/\">\u00a0<i class=\"fa fa-code-fork\"><\/i>\u00a0 Using breadboard<\/a> <a class=\"mb-button mb-style-glass mb-size-small mb-corners-default mb-text-style-default \" style=\"background-color: #2b7dc4;\" href=\"https:\/\/einhugur.com\/blog\/index.php\/basic-electronics\/resistor-color-codings\/\">\u00a0<i class=\"fa fa-bars\"><\/i>\u00a0 Resistor color codings<\/a><\/p>\n<hr \/>\n<p><strong>First thing is\u00a0to understand the basics of LED.<\/strong><\/p>\n<p>You need to know the spec of your LED, important numbers are Vf and how much maximum\u00a0current they can handle.<\/p>\n<p>The Vf is the forward voltage of the LED. \u00a0This is important when you put it into the Ohms equations.<\/p>\n<p><em>The GPIO pin on Raspberry PI will have around 3.3 V and the absolute maximum you may take from it is 16 mA, peek usage, meaning the pins were designed for about 3 mA if all are in use.<\/em><\/p>\n<p>So to calculate the resistor needed then you need to know Vr which is the Voltage on the circuit minus forward voltage of the LED (Vf). Then we can apply the Ohms law:<\/p>\n<blockquote><p>I = V \/ R<\/p><\/blockquote>\n<p>which can be re-written as:<\/p>\n<blockquote><p>R = V \/ I<\/p><\/blockquote>\n<p>Where V is Voltage of the circuit &#8211; Vf of the LED and I is desired current.<\/p>\n<p>We are in this example going to aim for 5 mA.<\/p>\n<h5><strong>Wiring of the RGB 4 pin led:<\/strong><\/h5>\n<p>If we first look at normal LED in the picture bellow then you can see that you have two ways to identify the + and &#8211; or anode vs cathode. Its the length of the pins where the longer wire is the anode and the shorter is the cathode. If wires have been trimmed then you can usually also see it on the LED it self the flat side on the edge is the cathode or &#8211; as is shown on the picture to right here.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2015\/10\/LED-Explained.png?ssl=1\"><img data-attachment-id=\"225\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/working-with-leds-and-wiring-4-pin-rgb-led-to-raspberry-pi\/led-explained\/\" data-orig-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2015\/10\/LED-Explained.png?fit=278%2C168&amp;ssl=1\" data-orig-size=\"278,168\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"LED Explained\" data-image-description=\"\" data-medium-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2015\/10\/LED-Explained.png?fit=278%2C168&amp;ssl=1\" data-large-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2015\/10\/LED-Explained.png?fit=278%2C168&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-225\" src=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2015\/10\/LED-Explained.png?resize=278%2C168&#038;ssl=1\" alt=\"LED Explained\" width=\"278\" height=\"168\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>For RGB led then things get a bit more complicated. RGB leds usually share common cathode (black which would be the longest wire or you can see it inside the glass by the shape there if the wire has been shortened), and then three anodes, red on the left then greed right of the cathode and then blue on far right.<\/p>\n<p><a href=\"https:\/\/i1.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2015\/10\/RGBLed-Explained.png?ssl=1\"><img data-attachment-id=\"228\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/working-with-leds-and-wiring-4-pin-rgb-led-to-raspberry-pi\/rgbled-explained\/\" data-orig-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2015\/10\/RGBLed-Explained.png?fit=84%2C231&amp;ssl=1\" data-orig-size=\"84,231\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"RGBLed Explained\" data-image-description=\"\" data-medium-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2015\/10\/RGBLed-Explained.png?fit=84%2C231&amp;ssl=1\" data-large-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2015\/10\/RGBLed-Explained.png?fit=84%2C231&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-228\" src=\"https:\/\/i1.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2015\/10\/RGBLed-Explained.png?resize=84%2C231&#038;ssl=1\" alt=\"RGBLed Explained\" width=\"84\" height=\"231\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p><em>(To complicate it a bit then I have seen RGB led where the anode was shared and there were three cathodes)<\/em><\/p>\n<p>I thought the spec of the led that I used was around 2 Vf for Red with max 50mA current. and 3 Vf for green and blue with max of 30 mA<br \/>\n<em>(Check specs on your LED if you have data before calculating) <span style=\"color: #ff0000;\">(See bellow, where I was incorrect on the spec)<\/span><\/em><\/p>\n<p>We apply this spec to the equations shown above where we decided on taking 3\u00a0mA from the pin.<\/p>\n<p>R(red) = (3.3 &#8211; 2.0) \/ 0.005 = 433\u00a0<em>\u03a9 =&gt; 440\u00a0\u03a9<\/em><br \/>\nR(green) = 3.3-3.0) \/ 0.003 =100<em>\u03a9<\/em><br \/>\nR(blue) = (3.3-3.0) \/ 0.003 = 100\u00a0<em>\u03a9<\/em><\/p>\n<p><span style=\"color: #808080;\"><em>Unless you got 5 band resistor that is 433 \u03a9 then use normal 4 band one that is \u00a0 440\u00a0\u03a9. We went with 5 band 433\u00a0\u03a9<\/em><\/span><\/p>\n<blockquote><p>Now I was not \u00a0sure of the spec I had for the RGB LED as I had just guessed it from fairly normal values but I didnt know, so I proceeded with caution, instead of going for GPIO&#8217;s right away then I decided to first just connect those resistors and the LED to the 3,3 V output on the Rapsberry PI along with a Digital Multimeter in between to measure the current I would draw with this setup.<\/p>\n<p><a href=\"https:\/\/i1.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2015\/10\/RGBLedMutimeterTestNew.png?ssl=1\"><img data-attachment-id=\"253\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/working-with-leds-and-wiring-4-pin-rgb-led-to-raspberry-pi\/rgbledmutimetertestnew\/\" data-orig-file=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2015\/10\/RGBLedMutimeterTestNew.png?fit=800%2C816&amp;ssl=1\" data-orig-size=\"800,816\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"RGBLedMutimeterTestNew\" data-image-description=\"\" data-medium-file=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2015\/10\/RGBLedMutimeterTestNew.png?fit=294%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2015\/10\/RGBLedMutimeterTestNew.png?fit=474%2C483&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-253\" src=\"https:\/\/i1.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2015\/10\/RGBLedMutimeterTestNew.png?resize=474%2C483&#038;ssl=1\" alt=\"RGBLedMutimeterTestNew\" width=\"474\" height=\"483\" srcset=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2015\/10\/RGBLedMutimeterTestNew.png?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2015\/10\/RGBLedMutimeterTestNew.png?resize=294%2C300&amp;ssl=1 294w\" sizes=\"(max-width: 474px) 100vw, 474px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>So I just\u00a0just 3,3 V output and GND, on the LED with a Digital multimeter to measure the current draw. The connection was done as shown in the drawing above, connecting to one resistor at a time to check their current draw.<\/p>\n<p>I had the LED on mini bread board because of this middle step it was easier to deal with it.<\/p>\n<p>Note that the 3,3 V output has maximum draw of 50 mA so you cannot do tests like this on just anything.<\/p>\n<p>It was soon obvious that the LED I had had totally different spec than expected, I ended with 820\u00a0<em>\u03a9 for the red and 220\u03a9 for the others, then I had values I was confortable putting on the GPIO.<\/em><\/p>\n<p>&nbsp;<\/p><\/blockquote>\n<p>After the calibration with the multi-meter then we had the following resistors:<\/p>\n<p>R(red) = \u00a0820<em>\u03a9<\/em><br \/>\nR(green) =220<em>\u03a9<\/em><br \/>\nR(blue) = 220\u00a0<em>\u03a9<\/em><\/p>\n<p>(If only having calculating values then its not bad idea to go with a little higher value resistors than you calculated to protect the pins just in case)<\/p>\n<p>Once I was satisfied with the values read from the multi-meter and convinced that it would not draw to much from the Raspberry GPIO pin then I proceeded in wiring the GPIO pins to the LED.<\/p>\n<p>I selected\u00a0GPIO 4, for Red anode, GPIO \u00a05 for Green anode, GPIO 6 for Blue anode.<\/p>\n<p><a href=\"https:\/\/i2.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2015\/10\/RGBLedGPIONew.png?ssl=1\"><img data-attachment-id=\"252\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/working-with-leds-and-wiring-4-pin-rgb-led-to-raspberry-pi\/rgbledgpionew\/\" data-orig-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2015\/10\/RGBLedGPIONew.png?fit=800%2C857&amp;ssl=1\" data-orig-size=\"800,857\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"RGBLedGPIONew\" data-image-description=\"\" data-medium-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2015\/10\/RGBLedGPIONew.png?fit=280%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2015\/10\/RGBLedGPIONew.png?fit=474%2C508&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-252\" src=\"https:\/\/i2.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2015\/10\/RGBLedGPIONew.png?resize=474%2C508&#038;ssl=1\" alt=\"RGBLedGPIONew\" width=\"474\" height=\"508\" srcset=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2015\/10\/RGBLedGPIONew.png?w=800&amp;ssl=1 800w, https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2015\/10\/RGBLedGPIONew.png?resize=280%2C300&amp;ssl=1 280w\" sizes=\"(max-width: 474px) 100vw, 474px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h1><strong>The Xojo code for this one is simple<\/strong><\/h1>\n<p>We had 3 checkboxes on a window, with the texts, Red, Green, Blue.<\/p>\n<p>The open event of the window:<\/p>\n<pre lang=\"xojo\">Sub Open()\r\n GPIO.SetupGPIO\r\n GPIO.PinMode(4,GPIO.OUTPUT)\r\n GPIO.PinMode(5,GPIO.OUTPUT)\r\n GPIO.PinMode(6,GPIO.OUTPUT)\r\n \r\n GPIO.DigitalWrite(4,GPIO.OFF)\r\n GPIO.DigitalWrite(5,GPIO.OFF)\r\n GPIO.DigitalWrite(6,GPIO.OFF)\r\nEnd Sub<\/pre>\n<p><strong>The check box events:<\/strong><\/p>\n<p>Red checkbox<\/p>\n<pre lang=\"xojo\">Sub Action()\r\n if me.Value then\r\n GPIO.DigitalWrite(4,GPIO.ON)\r\n else\r\n GPIO.DigitalWrite(4,GPIO.OFF)\r\n end if\r\nEnd Sub\r\n\r\n<\/pre>\n<p>Green\u00a0checkbox<\/p>\n<pre lang=\"xojo\">Sub Action()\r\n if me.Value then\r\n GPIO.DigitalWrite(5,GPIO.ON)\r\n else\r\n GPIO.DigitalWrite(5,GPIO.OFF)\r\n end if\r\nEnd Sub\r\n\r\n<\/pre>\n<p>Blue\u00a0checkbox<\/p>\n<pre lang=\"xojo\">Sub Action()\r\n if me.Value then\r\n GPIO.DigitalWrite(6,GPIO.ON)\r\n else\r\n GPIO.DigitalWrite(6,GPIO.OFF)\r\n end if\r\nEnd Sub\r\n\r\n<\/pre>\n<p>Thats it for now. I will probably make a followup on this one adding transistors maybe to see how more current\u00a0can be given to the LED without hurting the GPIO pins.<\/p>\n<p><code><br \/>\n<a href=\"http:\/\/s.click.aliexpress.com\/e\/F2fA6aqRZ\" target=\"_parent\"><img src=\"https:\/\/i0.wp.com\/g03.a.alicdn.com\/kf\/HTB1rlIxIVXXXXX4aXXXq6xXFXXXV\/Brand-font-b-digital-b-font-font-b-multimeter-b-font-multimetro-tester-AC-DC-LCD.jpg_220x220.jpg?w=474\" data-recalc-dims=\"1\" \/><span style=\"display: block;\">AliExpress.com Product - Brand digital multimeter multimetro tester AC DC LCD Display Professional Electric Handheld Testers multimetr free shipping <\/span><\/a><br \/>\n<\/code><\/p>\n<p><code><br \/>\n<a href=\"http:\/\/s.click.aliexpress.com\/e\/ZbqFEQnmY\" target=\"_parent\"><img src=\"https:\/\/i0.wp.com\/g04.a.alicdn.com\/kf\/HTB14YxAHFXXXXbEXFXXq6xXFXXXS\/1-4w-font-b-resistors-b-font-pack-121-values-x-20pcs-2420pcs-0-33-4.jpg_220x220.jpg?w=474\" alt=\"\" data-recalc-dims=\"1\" \/><span style=\"display: block;\">AliExpress.com Product - Carbon film resistor assorted kit 0.33 ohm - 4.7M ohm 1\/4w 5% tolerance commonly used 122 values 20x 122= 2440pcs<\/span><\/a><br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this example we are going\u00a0learn some basics on how to calculate the resistor for LED, and we will take a look at how to wire up a 4 pin RGB LED. Disclaimer: We do not take any responsibility for possible errors in the guide or errors that you might do wiring it up. Incorrect &hellip; <a href=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/working-with-leds-and-wiring-4-pin-rgb-led-to-raspberry-pi\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Working with LED&#8217;s &#8211; And Wiring 4 pin RGB led to Raspberry PI<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":94,"menu_order":130,"comment_status":"open","ping_status":"closed","template":"","meta":{"spay_email":""},"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/Pd75nk-3C","jetpack-related-posts":[{"id":108,"url":"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/f85-vibration-sensor\/","url_meta":{"origin":224,"position":0},"title":"F85 Vibration sensor","date":"September 19, 2015","format":false,"excerpt":"In this example we are going to connect to\u00a0vibration sensor. This example is super easy after doing the infrared motion detection with the HC-SR501 in a previous example, since basically same code will work. I found this sensor to be excellent, it gives readings when I expect it to and\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"https:\/\/i1.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2015\/09\/Sensor-connection-e1442664059628-225x300.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":113,"url":"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/flame-sensor\/","url_meta":{"origin":224,"position":1},"title":"Flame sensor","date":"September 19, 2015","format":false,"excerpt":"In this example we are going to connect to flame\u00a0sensor. Programming for this sensor works on exactly the same principle as the\u00a0HC-SR501 infrared sensor and the F85 vibration sensor except the signal from this sensor comes inverted. As in it will send 1 when everything is all right and zero\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2015\/09\/FlameSensor-e1442681877884-225x300.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":137,"url":"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/ir-infrared-obstacle-reflection-photoelectric-sensor\/","url_meta":{"origin":224,"position":2},"title":"IR Infrared Obstacle Reflection Photoelectric Sensor","date":"September 20, 2015","format":false,"excerpt":"In this example we are going to connect to infrared obstacle reflection photoelectric sensor motion detection sensor. I am not going to deny it, I find this sensor to be awful rubbish. Without reading the data you can hook it up and see it when the 2nd green lights goes\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2015\/09\/IRSensor-e1442754741492-225x300.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":311,"url":"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/putting-the-gpio-pin-behind-transistor-to-get-more-current\/","url_meta":{"origin":224,"position":3},"title":"Putting the GPIO pin behind transistor to get more current","date":"October 23, 2015","format":false,"excerpt":"In this example we are going to let the GPIO pin control a transistor so that we can draw more power when controlling a LED than what the GPIO pin can supply. We will be using a simple LED in this example where we aim to draw 16 mA power\u2026","rel":"","context":"Similar post","img":{"alt_text":"TransistorExperimentbb","src":"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2015\/10\/TransistorExperimentbb.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":128,"url":"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/dht11-and-dht22-humidity-temperature-sensors-3-pin-version\/","url_meta":{"origin":224,"position":4},"title":"DHT11 and DHT22 humidity & temperature sensors (3 pin version)","date":"September 20, 2015","format":false,"excerpt":"In this example we are going to connect\u00a0to DHT11 and or DHT22 humidity & temperature sensor. This sensor reads both the humidity and temperature. (This guide was updated on 24. Oct 2015, greatly improving the DHT11 device driver code and added DHT22 device driver code and wiring pictures for the\u2026","rel":"","context":"Similar post","img":{"alt_text":"DHT22 sensor","src":"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2015\/09\/DHT22.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":288,"url":"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/connecting-max7219_led_matrix-with-spi-bus\/","url_meta":{"origin":224,"position":5},"title":"Connecting MAX7219_LED_MATRIX with SPI bus","date":"October 21, 2015","format":false,"excerpt":"In this example we going to connect a\u00a0MAX7219_LED_MATRIX and control it with the SPI bus on the Raspberry PI. 8. Nov 2015 Important !! When I was working on next step in this to daisy chain more than one on same bus then I measured some extreme power usage at\u2026","rel":"","context":"Similar post","img":{"alt_text":"MAX7219_LED_MATRIX","src":"https:\/\/i2.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2015\/10\/MAX7219_LED_MATRIX-e1445384705632.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/einhugur.net\/blog\/index.php\/wp-json\/wp\/v2\/pages\/224"}],"collection":[{"href":"https:\/\/einhugur.net\/blog\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/einhugur.net\/blog\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/einhugur.net\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/einhugur.net\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=224"}],"version-history":[{"count":1,"href":"https:\/\/einhugur.net\/blog\/index.php\/wp-json\/wp\/v2\/pages\/224\/revisions"}],"predecessor-version":[{"id":612,"href":"https:\/\/einhugur.net\/blog\/index.php\/wp-json\/wp\/v2\/pages\/224\/revisions\/612"}],"up":[{"embeddable":true,"href":"https:\/\/einhugur.net\/blog\/index.php\/wp-json\/wp\/v2\/pages\/94"}],"wp:attachment":[{"href":"https:\/\/einhugur.net\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}