{"id":440,"date":"2014-10-05T21:22:08","date_gmt":"2014-10-05T20:22:08","guid":{"rendered":"http:\/\/www.weise-bernd.de\/?p=440"},"modified":"2018-03-04T10:38:22","modified_gmt":"2018-03-04T09:38:22","slug":"wochenend-projekt-rgb-led","status":"publish","type":"post","link":"https:\/\/www.weise-bernd.de\/?p=440","title":{"rendered":"Wochenend-Projekt (RGB-LED)"},"content":{"rendered":"<p>Diese kleinen RGB-LED\u00b4s haben es mir schon immer angetan. Nun konnte ich sehr g\u00fcnstig einige &#8222;High Power LED&#8217;s&#8220; \u00fcbers Internet beziehen, die promt noch am Donnerstag geliefert wurden. Also hatte ich am Wochenende Zeit eine \u201ezum Test\u201c zu verarbeiten.<\/p>\n<p>Einen alten K\u00fchlk\u00f6rper von einem alte Rechner hatte ich noch auf dem ich die LED verschraubt habe.<\/p>\n<p><a href=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/001.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-444\" src=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/001-225x300.jpg\" alt=\"001\" width=\"225\" height=\"300\" srcset=\"https:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/001-225x300.jpg 225w, https:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/001-768x1024.jpg 768w, https:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/001.jpg 1024w\" sizes=\"auto, (max-width: 225px) 100vw, 225px\" \/><\/a><\/p>\n<p>Das ganze Verschraubt, aber durch den K\u00fchlk\u00f6rper recht \u201etricky\u201c zu verl\u00f6ten.<\/p>\n<p><a href=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/002.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-445\" src=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/002-300x225.jpg\" alt=\"002\" width=\"300\" height=\"225\" srcset=\"https:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/002-300x225.jpg 300w, https:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/002.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Dann die RGB-LED testen, &#8211; w\u00e4re doch \u00e4rgerlich, wenn diese nicht richtig funktioniert.<\/p>\n<p><a href=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/003.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-446\" src=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/003-225x300.jpg\" alt=\"003\" width=\"225\" height=\"300\" srcset=\"https:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/003-225x300.jpg 225w, https:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/003-768x1024.jpg 768w, https:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/003.jpg 1024w\" sizes=\"auto, (max-width: 225px) 100vw, 225px\" \/><\/a><\/p>\n<p>Das ganze \u201everl\u00f6tet\u201c Ich h\u00e4tte gleich an l\u00e4ngere Kabel denken sollen!<\/p>\n<p><a href=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/004.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-447\" src=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/004-225x300.jpg\" alt=\"004\" width=\"225\" height=\"300\" srcset=\"https:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/004-225x300.jpg 225w, https:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/004-768x1024.jpg 768w, https:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/004.jpg 1024w\" sizes=\"auto, (max-width: 225px) 100vw, 225px\" \/><\/a><\/p>\n<p>Und zu guter Letzt die RGB-LED an den Arduino UNO angeschlossen.<\/p>\n<p><a href=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/005.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-448\" src=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/005-150x150.jpg\" alt=\"005\" width=\"150\" height=\"150\" \/><\/a><a href=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/006.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-449\" src=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/006-150x150.jpg\" alt=\"006\" width=\"150\" height=\"150\" \/><\/a><a href=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/007.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-450\" src=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/007-150x150.jpg\" alt=\"007\" width=\"150\" height=\"150\" \/><\/a><a href=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/008.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-451\" src=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/008-150x150.jpg\" alt=\"008\" width=\"150\" height=\"150\" \/><\/a><a href=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/009.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-452\" src=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/009-150x150.jpg\" alt=\"009\" width=\"150\" height=\"150\" \/><\/a><a href=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/010.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-453\" src=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/010-150x150.jpg\" alt=\"010\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<div style=\"width: 320px;\" class=\"wp-video\"><!--[if lt IE 9]><script>document.createElement('video');<\/script><![endif]-->\n<video class=\"wp-video-shortcode\" id=\"video-440-1\" width=\"320\" height=\"240\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/VID_20141005_212422_393.mp4?_=1\" \/><a href=\"http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/VID_20141005_212422_393.mp4\">http:\/\/www.weise-bernd.de\/wp-content\/uploads\/2014\/10\/VID_20141005_212422_393.mp4<\/a><\/video><\/div>\n<p>Die roten Kreise, die man auf dem Video sieht sehen zwar cool aus, waren aber nicht geplant und man sieht sie in Wirklichkeit mit blo\u00dfem Auge nicht. ( Die Handy-Kamera schon!)<\/p>\n<p style=\"text-align: left;\">Anbei der Sketch mit dem Code:<\/p>\n<div class=\"code-embed-wrapper\"> <pre class=\"language-c code-embed-pre\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-c code-embed-code\">\/*<br\/>Fade<br\/><br\/>This example shows how to fade an RGB-LED on pin 9, 10,11<br\/>using the analogWrite() function.<br\/><br\/>This example code is in the public domain.<br\/>*\/<br\/><br\/>int ledBlue = 9, ledRed =10, ledGreen =11;                             \/\/ the pin that the LED is attached to (Blue)<br\/>int brightnessBlue = 0, brightnessRed = 0, brightnessGreen = 0;    \/\/ how bright the LED is (all Color starts with 0)<br\/>int fadeBlue = 5, fadeRed = 4, fadeGreen =3;                        \/\/ how many points to fade the LED by<br\/><br\/>\/\/ the setup routine runs once when you press reset:<br\/>void setup()  {<br\/>\/\/ declare pin 9 to be an output:<br\/>pinMode(ledBlue, OUTPUT);<br\/>pinMode(ledRed, OUTPUT);<br\/>pinMode(ledGreen, OUTPUT);<br\/>}<br\/><br\/>\/\/ the loop routine runs over and over again forever:<br\/>void loop()  {<br\/>\/\/ set the brightness of pin 9:<br\/>analogWrite(ledBlue, brightnessBlue);<br\/>analogWrite(ledRed, brightnessRed);<br\/>analogWrite(ledGreen, brightnessGreen);<br\/><br\/>\/\/ change the brightness for next time through the loop:<br\/>brightnessBlue = brightnessBlue + fadeBlue;<br\/>brightnessRed = brightnessRed + fadeRed;<br\/>brightnessGreen = brightnessGreen + fadeGreen;<br\/>\/\/ reverse the direction of the fading at the ends of the fade:<br\/>if (brightnessBlue == 0 || brightnessBlue == 255) {<br\/>fadeBlue = -fadeBlue ;<br\/>}<br\/>if (brightnessRed == 0 || brightnessRed == 255) {<br\/>fadeRed = -fadeRed ;<br\/>}<br\/>if (brightnessGreen == 0 || brightnessGreen == 255) {<br\/>fadeGreen = -fadeGreen ;<br\/>}<br\/>\/\/ wait for 300 milliseconds to see the dimming effect<br\/>delay(300);<br\/>}<\/code><\/pre> <div class=\"code-embed-infos\"> <\/div> <\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Diese kleinen RGB-LED\u00b4s haben es mir schon immer angetan. Nun konnte ich sehr g\u00fcnstig einige &#8222;High Power LED&#8217;s&#8220; \u00fcbers Internet beziehen, die promt noch am Donnerstag geliefert wurden. Also hatte ich am Wochenende Zeit eine \u201ezum Test\u201c zu verarbeiten. Einen &hellip; <a href=\"https:\/\/www.weise-bernd.de\/?p=440\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,11,6,9],"tags":[],"class_list":["post-440","post","type-post","status-publish","format-standard","hentry","category-arduino","category-elektronik","category-microcontroller","category-wochenend-projekte"],"_links":{"self":[{"href":"https:\/\/www.weise-bernd.de\/index.php?rest_route=\/wp\/v2\/posts\/440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weise-bernd.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weise-bernd.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weise-bernd.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weise-bernd.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=440"}],"version-history":[{"count":13,"href":"https:\/\/www.weise-bernd.de\/index.php?rest_route=\/wp\/v2\/posts\/440\/revisions"}],"predecessor-version":[{"id":667,"href":"https:\/\/www.weise-bernd.de\/index.php?rest_route=\/wp\/v2\/posts\/440\/revisions\/667"}],"wp:attachment":[{"href":"https:\/\/www.weise-bernd.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weise-bernd.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weise-bernd.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}