{"id":139,"date":"2021-07-11T16:51:24","date_gmt":"2021-07-11T16:51:24","guid":{"rendered":"http:\/\/imported-83"},"modified":"2021-07-11T16:51:24","modified_gmt":"2021-07-11T16:51:24","slug":"rgb","status":"publish","type":"post","link":"http:\/\/130.110.14.181\/index.php\/2021\/07\/11\/rgb\/","title":{"rendered":"RGB"},"content":{"rendered":"<p>Mischiando, con diversa intensit\u00e0, la luce di 3 LED di colore rosso, verde e blu \u00e8 possibile creare tutti i colori.<\/p>\n<p><span style=\"font-family: courier new, courier; font-size: 12pt;\"><img decoding=\"async\" src=\"\/images\/Arduino\/RGB\/RGB_html_faf224bdc13516a4.gif\" alt=\"RGB html faf224bdc13516a4\" style=\"margin-left: 20px; margin-right: 50px; float: left;\" \/>&nbsp;&nbsp; Un LED RedGgreeBlue raccoglie in un modo compatto 3 LED di colore rispettivamente rosso, verde e blu. Mischiando questi tre colori con diversa intensit\u00e0 (metodo additivo) \u00e8 possibile creare tutti i colori della luce. I LED RGB hanno quattro pin, uno per ognuno dei tre colori ed uno per terra o potenza, a seconda della configurazione se a &#8220;catodo comune&#8221; o ad &#8220;anodo comune&#8221;; noi utilizzeremo il primo.<\/span><\/p>\n<p><span style=\"font-family: courier new, courier; font-size: 12pt;\">&nbsp;&nbsp; Proprio perch\u00e9, per creare i diversi colori dobbiamo usare il metodo additivo, per variare le intensit\u00e0 dei colori primari \u00e8 necessario usare le uscite analogiche PWM di Arduino contrassegnate da una tilde.<\/span><\/p>\n<p><span style=\"font-family: courier new, courier; font-size: 12pt;\">Non \u00e8 opportuno utilizzare una sola resistenza sul catodo comune in quanto ogni LED necessita di una propria resistenza poich\u00e9 richiedono correnti di diversa intensit\u00e0.<\/span><\/p>\n<p><span style=\"font-family: courier new, courier; font-size: 12pt;\">&nbsp;&nbsp; A volte si intravedono separati i colori primari; prova a coprire il LED con materiali diffusori come ad esempio carta da forno o una pallina da ping pong. Comprenderai cos\u00ec come vengono creati i singoli pixel, anche se molto pi\u00f9 piccoli, negli schermi della TV o del computer.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/images\/Arduino\/RGB\/RGB_html_ac5c8284775320a8.png\" alt=\"RGB html ac5c8284775320a8\" width=\"400\" height=\"342\" style=\"display: block; margin-left: auto; margin-right: auto;\" \/><\/p>\n<p><span style=\"font-size: 14pt;\"><strong><span style=\"font-family: courier new, courier; font-size: 12pt;\">Componenti<\/span><\/strong><\/span><\/p>\n<ul>\n<li><span style=\"font-family: courier new, courier; font-size: 12pt;\">1 LED RGB<\/span><\/li>\n<li><span style=\"font-family: courier new, courier; font-size: 12pt;\">3 resistenze di 220\u03a9<\/span><\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"\/images\/Arduino\/RGB\/RGB_html_5e450a9e029ddf6d.png\" alt=\"RGB html 5e450a9e029ddf6d\" style=\"margin: 20px; float: left;\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/images\/Arduino\/RGB\/RGB_html_230636f1f23f4bac.png\" alt=\"RGB html 230636f1f23f4bac\" style=\"margin-left: 50px;\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><code><span style=\"font-family: courier new, courier; font-size: 12pt;\">void setup()<\/span><\/code><br \/><code><span style=\"font-family: courier new, courier; font-size: 12pt;\">{<\/span><\/code><br \/><code><span style=\"font-family: courier new, courier; font-size: 12pt;\">&nbsp; pinMode(11, OUTPUT);<\/span><\/code><br \/><code><span style=\"font-family: courier new, courier; font-size: 12pt;\">&nbsp; pinMode(10, OUTPUT);<\/span><\/code><br \/><code><span style=\"font-family: courier new, courier; font-size: 12pt;\">&nbsp; pinMode(9, OUTPUT);<\/span><\/code><br \/><code><span style=\"font-family: courier new, courier; font-size: 12pt;\">}<\/span><\/code><\/p>\n<p><code><span style=\"font-family: courier new, courier; font-size: 12pt;\">void loop()<\/span><\/code><br \/><code><span style=\"font-family: courier new, courier; font-size: 12pt;\">{<\/span><\/code><br \/><code><span style=\"font-family: courier new, courier; font-size: 12pt;\">&nbsp; analogWrite(11, 255),<\/span><span style=\"font-family: courier new, courier; font-size: 12pt;\"> analogWrite(10, 0),<\/span><span style=\"font-family: courier new, courier; font-size: 12pt;\"> analogWrite(9, 0);<\/span><\/code><br \/><code><span style=\"font-family: courier new, courier; font-size: 12pt;\">&nbsp; delay(1000);<\/span><\/code><br \/><code><span style=\"font-family: courier new, courier; font-size: 12pt;\">&nbsp; analogWrite(11, 255),<\/span><span style=\"font-family: courier new, courier; font-size: 12pt;\"> analogWrite(10, 255),<\/span><span style=\"font-family: courier new, courier; font-size: 12pt;\"> analogWrite(9, 102);<\/span><\/code><br \/><code><span style=\"font-family: courier new, courier; font-size: 12pt;\">&nbsp; delay(1000);<\/span><\/code><br \/><code><span style=\"font-family: courier new, courier; font-size: 12pt;\">}<\/span><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mischiando, con diversa intensit\u00e0, la luce di 3 LED di colore rosso, verde e blu \u00e8 possibile creare tutti i colori. &nbsp;&nbsp; Un LED RedGgreeBlue raccoglie in un modo compatto [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_EventAllDay":false,"_EventTimezone":"","_EventStartDate":"","_EventEndDate":"","_EventStartDateUTC":"","_EventEndDateUTC":"","_EventShowMap":false,"_EventShowMapLink":false,"_EventURL":"","_EventCost":"","_EventCostDescription":"","_EventCurrencySymbol":"","_EventCurrencyCode":"","_EventCurrencyPosition":"","_EventDateTimeSeparator":"","_EventTimeRangeSeparator":"","_EventOrganizerID":[],"_EventVenueID":[],"_OrganizerEmail":"","_OrganizerPhone":"","_OrganizerWebsite":"","_VenueAddress":"","_VenueCity":"","_VenueCountry":"","_VenueProvince":"","_VenueState":"","_VenueZip":"","_VenuePhone":"","_VenueURL":"","_VenueStateProvince":"","_VenueLat":"","_VenueLng":"","_VenueShowMap":false,"_VenueShowMapLink":false,"footnotes":""},"categories":[13],"tags":[],"class_list":["post-139","post","type-post","status-publish","format-standard","hentry","category-giochi-di-luce-con-arduino"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>RGB - PugliaSOS2.0<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/130.110.14.181\/index.php\/2021\/07\/11\/rgb\/\" \/>\n<meta property=\"og:locale\" content=\"it_IT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"RGB - PugliaSOS2.0\" \/>\n<meta property=\"og:description\" content=\"Mischiando, con diversa intensit\u00e0, la luce di 3 LED di colore rosso, verde e blu \u00e8 possibile creare tutti i colori. &nbsp;&nbsp; Un LED RedGgreeBlue raccoglie in un modo compatto [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/130.110.14.181\/index.php\/2021\/07\/11\/rgb\/\" \/>\n<meta property=\"og:site_name\" content=\"PugliaSOS2.0\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-11T16:51:24+00:00\" \/>\n<meta name=\"author\" content=\"PugliaSOS\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Scritto da\" \/>\n\t<meta name=\"twitter:data1\" content=\"PugliaSOS\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tempo di lettura stimato\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minuto\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\\\/\\\/130.110.14.181\\\/index.php\\\/2021\\\/07\\\/11\\\/rgb\\\/#article\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/130.110.14.181\\\/index.php\\\/2021\\\/07\\\/11\\\/rgb\\\/\"},\"author\":{\"name\":\"PugliaSOS\",\"@id\":\"http:\\\/\\\/130.110.14.181\\\/#\\\/schema\\\/person\\\/1e219b3d8de394c7d6969b52c116f336\"},\"headline\":\"RGB\",\"datePublished\":\"2021-07-11T16:51:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\\\/\\\/130.110.14.181\\\/index.php\\\/2021\\\/07\\\/11\\\/rgb\\\/\"},\"wordCount\":207,\"articleSection\":[\"Giochi di luce con Arduino\"],\"inLanguage\":\"it-IT\"},{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/130.110.14.181\\\/index.php\\\/2021\\\/07\\\/11\\\/rgb\\\/\",\"url\":\"http:\\\/\\\/130.110.14.181\\\/index.php\\\/2021\\\/07\\\/11\\\/rgb\\\/\",\"name\":\"RGB - PugliaSOS2.0\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/130.110.14.181\\\/#website\"},\"datePublished\":\"2021-07-11T16:51:24+00:00\",\"author\":{\"@id\":\"http:\\\/\\\/130.110.14.181\\\/#\\\/schema\\\/person\\\/1e219b3d8de394c7d6969b52c116f336\"},\"breadcrumb\":{\"@id\":\"http:\\\/\\\/130.110.14.181\\\/index.php\\\/2021\\\/07\\\/11\\\/rgb\\\/#breadcrumb\"},\"inLanguage\":\"it-IT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\\\/\\\/130.110.14.181\\\/index.php\\\/2021\\\/07\\\/11\\\/rgb\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/130.110.14.181\\\/index.php\\\/2021\\\/07\\\/11\\\/rgb\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\\\/\\\/130.110.14.181\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"RGB\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/130.110.14.181\\\/#website\",\"url\":\"http:\\\/\\\/130.110.14.181\\\/\",\"name\":\"PugliaSOS2.0\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\\\/\\\/130.110.14.181\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"it-IT\"},{\"@type\":\"Person\",\"@id\":\"http:\\\/\\\/130.110.14.181\\\/#\\\/schema\\\/person\\\/1e219b3d8de394c7d6969b52c116f336\",\"name\":\"PugliaSOS\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0f3d85b8e8409fc2c484f438be7de4caf93659f326adbb248e8a1ac5c2e16fd6?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0f3d85b8e8409fc2c484f438be7de4caf93659f326adbb248e8a1ac5c2e16fd6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0f3d85b8e8409fc2c484f438be7de4caf93659f326adbb248e8a1ac5c2e16fd6?s=96&d=mm&r=g\",\"caption\":\"PugliaSOS\"},\"url\":\"http:\\\/\\\/130.110.14.181\\\/index.php\\\/author\\\/pugliasos\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"RGB - PugliaSOS2.0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/130.110.14.181\/index.php\/2021\/07\/11\/rgb\/","og_locale":"it_IT","og_type":"article","og_title":"RGB - PugliaSOS2.0","og_description":"Mischiando, con diversa intensit\u00e0, la luce di 3 LED di colore rosso, verde e blu \u00e8 possibile creare tutti i colori. &nbsp;&nbsp; Un LED RedGgreeBlue raccoglie in un modo compatto [&hellip;]","og_url":"http:\/\/130.110.14.181\/index.php\/2021\/07\/11\/rgb\/","og_site_name":"PugliaSOS2.0","article_published_time":"2021-07-11T16:51:24+00:00","author":"PugliaSOS","twitter_card":"summary_large_image","twitter_misc":{"Scritto da":"PugliaSOS","Tempo di lettura stimato":"1 minuto"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/130.110.14.181\/index.php\/2021\/07\/11\/rgb\/#article","isPartOf":{"@id":"http:\/\/130.110.14.181\/index.php\/2021\/07\/11\/rgb\/"},"author":{"name":"PugliaSOS","@id":"http:\/\/130.110.14.181\/#\/schema\/person\/1e219b3d8de394c7d6969b52c116f336"},"headline":"RGB","datePublished":"2021-07-11T16:51:24+00:00","mainEntityOfPage":{"@id":"http:\/\/130.110.14.181\/index.php\/2021\/07\/11\/rgb\/"},"wordCount":207,"articleSection":["Giochi di luce con Arduino"],"inLanguage":"it-IT"},{"@type":"WebPage","@id":"http:\/\/130.110.14.181\/index.php\/2021\/07\/11\/rgb\/","url":"http:\/\/130.110.14.181\/index.php\/2021\/07\/11\/rgb\/","name":"RGB - PugliaSOS2.0","isPartOf":{"@id":"http:\/\/130.110.14.181\/#website"},"datePublished":"2021-07-11T16:51:24+00:00","author":{"@id":"http:\/\/130.110.14.181\/#\/schema\/person\/1e219b3d8de394c7d6969b52c116f336"},"breadcrumb":{"@id":"http:\/\/130.110.14.181\/index.php\/2021\/07\/11\/rgb\/#breadcrumb"},"inLanguage":"it-IT","potentialAction":[{"@type":"ReadAction","target":["http:\/\/130.110.14.181\/index.php\/2021\/07\/11\/rgb\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/130.110.14.181\/index.php\/2021\/07\/11\/rgb\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/130.110.14.181\/"},{"@type":"ListItem","position":2,"name":"RGB"}]},{"@type":"WebSite","@id":"http:\/\/130.110.14.181\/#website","url":"http:\/\/130.110.14.181\/","name":"PugliaSOS2.0","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/130.110.14.181\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"it-IT"},{"@type":"Person","@id":"http:\/\/130.110.14.181\/#\/schema\/person\/1e219b3d8de394c7d6969b52c116f336","name":"PugliaSOS","image":{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/secure.gravatar.com\/avatar\/0f3d85b8e8409fc2c484f438be7de4caf93659f326adbb248e8a1ac5c2e16fd6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0f3d85b8e8409fc2c484f438be7de4caf93659f326adbb248e8a1ac5c2e16fd6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0f3d85b8e8409fc2c484f438be7de4caf93659f326adbb248e8a1ac5c2e16fd6?s=96&d=mm&r=g","caption":"PugliaSOS"},"url":"http:\/\/130.110.14.181\/index.php\/author\/pugliasos\/"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/130.110.14.181\/index.php\/wp-json\/wp\/v2\/posts\/139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/130.110.14.181\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/130.110.14.181\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/130.110.14.181\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/130.110.14.181\/index.php\/wp-json\/wp\/v2\/comments?post=139"}],"version-history":[{"count":0,"href":"http:\/\/130.110.14.181\/index.php\/wp-json\/wp\/v2\/posts\/139\/revisions"}],"wp:attachment":[{"href":"http:\/\/130.110.14.181\/index.php\/wp-json\/wp\/v2\/media?parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/130.110.14.181\/index.php\/wp-json\/wp\/v2\/categories?post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/130.110.14.181\/index.php\/wp-json\/wp\/v2\/tags?post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}