{"id":96,"date":"2025-12-19T15:32:15","date_gmt":"2025-12-19T15:32:15","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/d_harkless\/?p=96"},"modified":"2025-12-19T15:32:15","modified_gmt":"2025-12-19T15:32:15","slug":"free-friday-12-19-25","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/d_harkless\/2025\/12\/19\/free-friday-12-19-25\/","title":{"rendered":"Free Friday 12\/19\/25"},"content":{"rendered":"\n<p>Today in class, my partner and I coded a finch robot to dance. The robot danced to Mistletoe by Justin Bieber for about 60s.  The dance includes lights.<\/p>\n\n\n\n<p>This is the code for the robot to dance and light up while dancing: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from BirdBrain import Finch\n\nmyFinch = Finch('A')\n\nmyFinch.setBeak(0,100,0)\nmyFinch.getLight(\"r\")\nmyFinch.setMove(\"b\",40, 70)\nmyFinch.setBeak(100,0,0)\nmyFinch.setMove(\"f\",40, 70)\nmyFinch.setBeak(0,0,100)\nmyFinch.setTurn(\"r\",180, 100)\nmyFinch.setBeak(0,100,0)\nmyFinch.setMove(\"b\",40, 100)\nmyFinch.setBeak(100,0,0)\nmyFinch.setTurn(\"r\",180, 100)\nmyFinch.setBeak(0,100,0)\nmyFinch.setTurn(\"l\",180, 100)\nmyFinch.setBeak(0,0,100)\nmyFinch.setTurn(\"l\",360, 100)\nmyFinch.setBeak(100,0,0)\nmyFinch.setTurn(\"l\",360, 100)\nmyFinch.setBeak(0,100,0)\nmyFinch.setMove(\"b\",20, 100)\nmyFinch.setBeak(0,0,100)\nmyFinch.setMove(\"f\",20, 100)\nmyFinch.setBeak(100,0,0)\nmyFinch.setTurn(\"l\",90, 100)\nmyFinch.setBeak(0,100,0)\nmyFinch.setMotors(100, 100)\nmyFinch.setBeak(0,0,100)\nmyFinch.setTurn(\"l\",360, 100)\nmyFinch.setBeak(100,0,0)\nmyFinch.setTurn(\"l\",360, 100)\nmyFinch.setBeak(0,100,0)\nmyFinch.setMove(\"f\",5, 100)\nmyFinch.setBeak(0,0,100)\nmyFinch.setMove(\"b\",5, 100)\nmyFinch.setBeak(100,0,0)\nmyFinch.setTurn(\"r\",180, 100)\nmyFinch.setBeak(0,100,0)\nmyFinch.setTurn(\"l\",180, 100)\nmyFinch.setBeak(0,0,100)\nmyFinch.setTurn(\"r\",360, 100)\nmyFinch.setBeak(100,0,0)\nmyFinch.setTurn(\"r\",360, 100)\nmyFinch.setBeak(0,100,0)\nmyFinch.setMove(\"b\",40, 70)\nmyFinch.setBeak(0,0,100)\nmyFinch.setMotors(-50, 50)\nmyFinch.setBeak(100,0,0)\nmyFinch.setMove(\"b\",20, 100)\nmyFinch.setBeak(0,100,0)\nmyFinch.setMove(\"f\",20, 100)\nmyFinch.setBeak(0,0,100)\nmyFinch.setTurn(\"l\",90, 100)\nmyFinch.setBeak(100,0,0)\nmyFinch.setMove(\"f\",5, 100)\nmyFinch.setBeak(0,100,0)\nmyFinch.setTurn(\"l\",360, 100)\nmyFinch.setBeak(0,0,100)\nmyFinch.setMove(\"f\",20, 100)\nmyFinch.setBeak(100,0,0)\nmyFinch.getLine('r')\n\n\n\nmyFinch.getSound()\nprint(\"Sound: \", myFinch.getSound())\n\n\n\nmyFinch.stopAll()\n\n\n\nThis is how the robot lights up, the colors are red, green, and blue.<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>myFinch.setBeak(100,0,0)\nmyFinch.setBeak(0,100,0)\nmyFinch.setBeak(0,0,100)<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today in class, my partner and I coded a finch robot to dance. The robot danced to Mistletoe by Justin Bieber for about 60s. The dance includes lights. This is the code for the robot to dance and light up while dancing:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-96","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/posts\/96","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/comments?post=96"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/posts\/96\/revisions"}],"predecessor-version":[{"id":97,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/posts\/96\/revisions\/97"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/media?parent=96"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/categories?post=96"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/tags?post=96"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}