{"id":59,"date":"2025-11-02T13:52:09","date_gmt":"2025-11-02T21:52:09","guid":{"rendered":"https:\/\/wp.stgeorges.bc.ca\/cooperm\/?p=59"},"modified":"2025-11-02T13:52:10","modified_gmt":"2025-11-02T21:52:10","slug":"robotics","status":"publish","type":"post","link":"https:\/\/wp.stgeorges.bc.ca\/cooperm\/2025\/11\/02\/robotics\/","title":{"rendered":"Robotics"},"content":{"rendered":"\n<p>For this project, we had to build something with Arduino. We used Arduino UNOs to create a project that made something physically move, so something like a buzzer wouldn&#8217;t be accepted. For this project, I did not employ the use of AI.<\/p>\n\n\n\n<p>Since I do not have very much experience with Arduino, I decided to do a simple project, just having a mini servo hooked up to the Arduino UNO on TinkerCAD, and coded it to spin slowly, switching directions every now and then.<\/p>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>This circuit works by having three different cables between the Arduino UNO and the mini servo. The first tells the servo it&#8217;s supposed to spin, and the second supplies it with power. Finally, the last cable taken the ground current and sends it back to the Arduino once it has gone through the servo first.<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"517\" src=\"https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-content\/uploads\/sites\/22\/2025\/11\/image-1024x517.png\" alt=\"\" class=\"wp-image-60\" srcset=\"https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-content\/uploads\/sites\/22\/2025\/11\/image-1024x517.png 1024w, https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-content\/uploads\/sites\/22\/2025\/11\/image-300x151.png 300w, https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-content\/uploads\/sites\/22\/2025\/11\/image-768x387.png 768w, https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-content\/uploads\/sites\/22\/2025\/11\/image-1536x775.png 1536w, https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-content\/uploads\/sites\/22\/2025\/11\/image.png 2018w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"466\" height=\"520\" src=\"https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-content\/uploads\/sites\/22\/2025\/11\/image-1.png\" alt=\"\" class=\"wp-image-61\" srcset=\"https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-content\/uploads\/sites\/22\/2025\/11\/image-1.png 466w, https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-content\/uploads\/sites\/22\/2025\/11\/image-1-269x300.png 269w\" sizes=\"auto, (max-width: 466px) 100vw, 466px\" \/><\/figure>\n<\/details>\n\n\n\n<p>For this circuit, you need two different parts, as well as 3 or more cables. The two parts you require for this circuit are an Arduino UNO and a positional micro servo.<\/p>\n\n\n\n<p>Once you have all these parts, and you&#8217;ve put them together to form the circuit, you&#8217;ll need to upload the code to the Arduino UNO. Now, if you&#8217;re building this circuit physically, you&#8217;ll need a few pieces of software as well as a connector cable that links your computer to the Arduino. However, if you&#8217;re creating this circuit in TinkerCAD or some other virtual software, you only need the actual code.<\/p>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>The code for this simple circuit is below, and is comprised of two main parts: The setup, where you establish all connected devices, and the loop, which is the actual code the Arduino is running.<\/summary>\n<pre class=\"wp-block-code\"><code>#include &lt;Servo.h&gt;\n\nint i = 0;\n\nint j = 0;\n\nint k = 0;\n\nServo servo_3;\n\nvoid setup()\n{\n  servo_3.attach(3);\n  \n}\n\nvoid loop()\n{\n  for (i = 0; i &lt;= 120; i+= 1) {\n    servo_3.write(i);\n    delay(50);\n  }\n  for (k = 120; k &gt;= 0; k-= 1) {\n    servo_3.write(k);\n    delay(50);\n  }\n}<\/code><\/pre>\n<\/details>\n\n\n\n<p>If you want to see an example of this circuit running, <a href=\"https:\/\/drive.google.com\/file\/d\/1br3M5arqSS1SPLRh-aoQPpGzcealrJon\/view?usp=sharing\">here<\/a> is a recording of it in TinkerCAD.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For this project, we had to build something with Arduino. We used Arduino UNOs to create a project that made something physically move, so something like a buzzer wouldn&#8217;t be accepted. For this project, I did not employ the use of AI. Since I do not have very much experience with Arduino, I decided to [&hellip;]<\/p>\n","protected":false},"author":20,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-59","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-json\/wp\/v2\/posts\/59","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-json\/wp\/v2\/comments?post=59"}],"version-history":[{"count":2,"href":"https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-json\/wp\/v2\/posts\/59\/revisions"}],"predecessor-version":[{"id":63,"href":"https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-json\/wp\/v2\/posts\/59\/revisions\/63"}],"wp:attachment":[{"href":"https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-json\/wp\/v2\/media?parent=59"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-json\/wp\/v2\/categories?post=59"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.stgeorges.bc.ca\/cooperm\/wp-json\/wp\/v2\/tags?post=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}