{"id":5587,"date":"2024-05-13T16:21:51","date_gmt":"2024-05-13T16:21:51","guid":{"rendered":"https:\/\/rodmilstead.com\/pt\/?page_id=5587"},"modified":"2024-05-13T18:11:34","modified_gmt":"2024-05-13T18:11:34","slug":"part-3-color-sensor-and-two-servos","status":"publish","type":"page","link":"https:\/\/rodmilstead.com\/pt\/part-3-color-sensor-and-two-servos\/","title":{"rendered":"Part 3: Color Sensor and Two Servos"},"content":{"rendered":"<p>This builds upon the circuit that you made in <a href=\"https:\/\/rodmilstead.com\/pt\/arduino-color-changing-leds\/\">Part 2: Color Sensor.<\/a><\/p>\n<p>This circuit (code provided below)<\/p>\n<p>Use your existing circuit (you can remove the RGB led) and add two servos following the pins specified in the code.<\/p>\n<p><strong>Your goal is to:<\/strong><br \/>\n1. refer to the code to attach two servos to the correct pins.<br \/>\n2. adjust the code so that each servo moves when a different color is detected.\u00a0 Look at lines 68 and 74. Line 68 moves servoRed and line 74 needs to be modified to move servoBlue.<\/p>\n<p><a href=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-13-at-11.09.58-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-large wp-image-5593\" src=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-13-at-11.09.58-AM-1024x288.png\" alt=\"\" width=\"660\" height=\"186\" srcset=\"https:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-13-at-11.09.58-AM-1024x288.png 1024w, https:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-13-at-11.09.58-AM-300x84.png 300w, https:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-13-at-11.09.58-AM-768x216.png 768w, https:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-13-at-11.09.58-AM.png 1528w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/docs.google.com\/document\/d\/1mZ0BYbyBQCc6lSa0bqWwA8s08MCl0jJGK0LfVE6-CeQ\/edit?usp=sharing\" target=\"_blank\" rel=\"noopener\">Here is the code.\u00a0\u00a0<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This builds upon the circuit that you made in Part 2: Color Sensor. This circuit (code provided below) Use your existing circuit (you can remove the RGB led) and add two servos following the pins specified in the code. Your goal is to: 1. refer to the code to attach two servos to the correct &hellip; <a href=\"https:\/\/rodmilstead.com\/pt\/part-3-color-sensor-and-two-servos\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Part 3: Color Sensor and Two Servos<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5587","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/pages\/5587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/comments?post=5587"}],"version-history":[{"count":3,"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/pages\/5587\/revisions"}],"predecessor-version":[{"id":5595,"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/pages\/5587\/revisions\/5595"}],"wp:attachment":[{"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/media?parent=5587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}