{"id":15,"date":"2021-12-18T22:57:35","date_gmt":"2021-12-18T22:57:35","guid":{"rendered":"https:\/\/www.protosigma.com\/wordpress\/?p=15"},"modified":"2021-12-18T22:57:36","modified_gmt":"2021-12-18T22:57:36","slug":"the-project","status":"publish","type":"post","link":"https:\/\/www.protosigma.com\/wordpress\/?p=15","title":{"rendered":"The Project"},"content":{"rendered":"\n<p>2021 Christmas is in two months, I would like to do a special gift to my 3yo son. He loves Lego and trucks , I like hardware and programming. Why not try to embed a board with servos and motors inside a Lego truck. I know Lego already provides a set with motors but it&#8217;s expensive and very limited.<\/p>\n\n\n\n<p>I started to search a good board and found a very promising one, the Cytron Maker PI.  It a brand new board having the new RP2040 from Raspberry. Here is the main features of this board:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>4 Servos driver<\/li><li>2 Motors driver<\/li><li>13 LEDs and 2 RGB LEDs<\/li><li>7 Grove ports<\/li><li>Multiple ways to power the board LiPo\/LiIon\/USB\/VIN with Power on\/off switch<\/li><li>Some switches<\/li><li>A buzzer (this is cool !)<\/li><li>4 holes specially sized for Lego<\/li><li>It&#8217;s pretty cheap, ~$10<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.protosigma.com\/wordpress\/wp-content\/uploads\/2021\/12\/maker-pi-rp2040.jpg\" alt=\"\" class=\"wp-image-22\" width=\"455\" height=\"304\"\/><\/figure><\/div>\n\n\n\n<p>In the past my son shown interest in my PS4 controller. Well why not use the PS4 controller to control the Lego truck ? The Maker Pi board can act as a host for a USB dongle but for now I don&#8217;t want to use this functionality. It&#8217;s not straightforward to decode the PS4 controller stream, and I need time to experiment (and I don&#8217;t have lot of time&#8230;). <\/p>\n\n\n\n<p>Instead I will use some kind of gateway between the board and the PS4 controller.  I just need DS4Windows on my PC to get the PS4 inputs, then encapsulate the commands and send it to a Bluetooth chip connected to the Maker Pi. Here is a perfect Grove sensor that gives a Bluetooth support.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.protosigma.com\/wordpress\/wp-content\/uploads\/2021\/12\/grove-bt-v3.jpg\" alt=\"\" class=\"wp-image-23\" width=\"241\" height=\"207\"\/><\/figure><\/div>\n\n\n\n<p>On the mechanical side, some servos\/motors compatible with Lego are available for cheap. Here is what I  will most likely buy. <\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<figure class=\"wp-block-gallery aligncenter columns-3 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"508\" src=\"https:\/\/www.protosigma.com\/wordpress\/wp-content\/uploads\/2021\/12\/geekservo-motor-2kg-lego-compatible.jpg\" alt=\"\" data-id=\"24\" class=\"wp-image-24\"\/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"469\" src=\"https:\/\/www.protosigma.com\/wordpress\/wp-content\/uploads\/2021\/12\/geekservo-9g-servo-compatible-with-lego.jpg\" alt=\"\" data-id=\"25\" data-link=\"https:\/\/www.protosigma.com\/wordpress\/?attachment_id=25\" class=\"wp-image-25\"\/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"593\" src=\"https:\/\/www.protosigma.com\/wordpress\/wp-content\/uploads\/2021\/12\/geekservo-9g-270-servo-compatible-with-lego.jpg\" alt=\"\" data-id=\"26\" data-link=\"https:\/\/www.protosigma.com\/wordpress\/?attachment_id=26\" class=\"wp-image-26\"\/><\/figure><\/li><\/ul><\/figure>\n<\/div><\/div>\n\n\n\n<p>For this project I will have to write two pieces of  Software: one for the board (supporting MicroPython, CircuitPython, or C\/C++), one for the gateway in C++ with MFC, it should be straightforward and fun !<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2021 Christmas is in two months, I would like to do a special gift to my 3yo son. He loves Lego and trucks , I [&hellip;]<\/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-15","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.protosigma.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.protosigma.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.protosigma.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.protosigma.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.protosigma.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15"}],"version-history":[{"count":9,"href":"https:\/\/www.protosigma.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/15\/revisions"}],"predecessor-version":[{"id":29,"href":"https:\/\/www.protosigma.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/15\/revisions\/29"}],"wp:attachment":[{"href":"https:\/\/www.protosigma.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.protosigma.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.protosigma.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}