[{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/002/368/original/robot1.jpg?1778525353","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n        \u003cp\u003eMy granddaughter and I love robots, and thanks to the Goodwill stores and little free libraries, we have a good supply of books, like the one above \"Robots, Robots Everywhere!\"\u003c/p\u003e\n\u003cp\u003eSo it only made sense that I should try to put together her own robot. I had a spare \u003ca href=\"https://www.adafruit.com/product/3333\" target=\"_blank\"\u003eCircuit Playground Express\u003c/a\u003e, two \u003ca title=\"Adafruit clip on servo\" href=\"https://www.adafruit.com/product/5592\" target=\"_blank\"\u003eservos\u003c/a\u003e, \u003ca href=\"https://www.adafruit.com/product/727\" target=\"_blank\"\u003ebattery pack,\u0026nbsp;\u003c/a\u003e a jigsaw and a supply of plywood. And this is what we came up with.\u003c/p\u003e\n      \n\n\n","metadata":{}},{"element_type":"embed","content":"https://www.youtube.com/shorts/N72B-PnVs_I"},{"element_type":"text","content":"\n  \n  \n        \u003ch2\u003eRobot Programming\u003c/h2\u003e\n\u003cp\u003eI decided to use MakeCode to program the robot - mainly because it let me use the microphone to trigger on \"loud noise\".\u0026nbsp;\u003c/p\u003e\n\u003cp\u003e\u003ca title=\"Robot code\" href=\"https://makecode.com/_Hvm745AFF9Yk\" target=\"_blank\"\u003eMakecode Program \u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eProgram has multiple functions:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cstrong\u003eLeftArm \u003c/strong\u003e- moves left arm\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eRight \u003c/strong\u003e- moves right arm\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eSmile \u003c/strong\u003e- plays a tune and\u0026nbsp; show \"white smile\" on the neopixels\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eFrown \u003c/strong\u003e- plays a tune and shows \"blue frown\" on the neopixels\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eGoCrazy \u003c/strong\u003e- sets up a random loop choosing the four functions above at random\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eThe A/B buttons will trigger the Left/Right arm functions. A+B triggers \"GoCrazy.\"\u003c/p\u003e\n\u003cp\u003eWhen the switch is set to the \u003cem\u003e\u003cstrong\u003eleft\u003c/strong\u003e\u003c/em\u003e, clapping your hands (or some other loud noise) sets the left and right arms moving. [When I was first testing, the \"loud\" sensitivity was too sensitive and the noise from the servos\u0026nbsp; kept it going so it wouldn't stop.]\u003c/p\u003e\n\u003cp\u003eI wrote another Makecode \u003ca title=\"robot controller\" href=\"https://makecode.com/_VR6PxV7XWLTz\" target=\"_blank\"\u003eCircuit Playground program \u003c/a\u003ethat I could use with another CPX to send commands to the robot. Pushing the A button cycles through 1, 2, 3 and 4 green neopixels showing. Pressing the \"B\" button transmits the number which the robot uses to choose LeftArm, RightArm, Smile or Frown.\u003c/p\u003e\n\u003cp\u003eWhen the switch is set to the\u0026nbsp;\u003cem\u003e\u003cstrong\u003eright\u0026nbsp;\u003c/strong\u003e\u003c/em\u003eany IR signal from the \"controller\" CPX will trigger GoCrazy. The same goes for a loud noise.\u003c/p\u003e\n\u003ch2\u003eFuture Plans\u003c/h2\u003e\n\u003cp\u003eThe fun in using the CPX as the \"brain\" means reprogramming our robot pal is very easy. I already tweaked it getting it set up, and I expect I'll think of more things - I'm sure my granddaughter will have feedback and suggestions.\u003c/p\u003e\n\u003cp\u003eAnd, of course, I expect CircuitPython is in the droid's future - that would let me give it a \"voice!\"\u003c/p\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n      \n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/002/387/original/robot2.jpg?1778547185","metadata":{}}]