{"id":9562,"date":"2024-10-27T21:26:52","date_gmt":"2024-10-27T20:26:52","guid":{"rendered":"https:\/\/dronesonen.usn.no\/?p=9562"},"modified":"2024-10-28T11:17:30","modified_gmt":"2024-10-28T10:17:30","slug":"magneto-week-8","status":"publish","type":"post","link":"https:\/\/dronesonen.usn.no\/?p=9562","title":{"rendered":"Magneto &#8211; Week 8"},"content":{"rendered":"\n<p><strong>Ulrik &#8211; Week 8<\/strong><\/p>\n\n\n\n<p>The designing of the spacers and fittings for the gantry has been done this week and I have gotten them 3d Printed. I have assembled the gantry and added it to the V-profile, but the number of wheel-bearings needed was 2x, so I need 8 more for the other side. One side, one to go.<\/p>\n\n\n\n<p>I have been spending a lot more time than expected on the gantries, both in terms of lacking shelf-parts and availability. The want for designing the needed parts instead of just buying a complete set was chosen for the learning of it.<\/p>\n\n\n\n<p>The whole robot has a clear stability-issue regarding the height of the crane and the thickness\/fastening of the plexiglass-plates. To combat this problem, I have designed some bracings to be fitted to the rigid legs and feet. The engines on top will power the movement, and the crane is way over dimensioned, so I will try to replace them with smaller one. This should also make the momentum created by movement significantly smaller. Adding photos.<\/p>\n\n\n\n<p>My plan for this week is to fit the bracings and the gantry without bearings. Fastening Will be done by gluing.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"Open photo\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXeMBJpcNsVac6b7b5FnI6aZa05IqyiFtJQnzKzNwhQMG9SYjrHpUB7XXpcmfkVxYEulS7sV0iPG712h3JPo9BiRPbbAZpYNLpGWOJiK5zstE0XbvwZ3_nRPNWYH8h0t1aSwbNpyyZYgzU9WnBvxVDmhwOJxsQpN1scpOlCi9WdtSXJKdlPfwXs?key=tiMruqGRxQm4U_3yXZ21Qw\" width=\"190\" height=\"254\"><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"Open photo\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXfDAkEHKUi5Cdi65AZkSTg7ywpdcLiKaRVkRa7-2vVnzdMr4iCUTwTDKXYX_H2sBeX_KD_j4rK-3K8KCVroKvU0pyF3y5zdP4i4X_Q9FxXTGso5AhzUIXpJbaXRlG3eXzOnH5Jp8Nk6iikV3Q3T3j4TlwBP6cK6f4HOiEfk6QTC_5SKNhwopA?key=tiMruqGRxQm4U_3yXZ21Qw\" width=\"190\" height=\"254\"><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"Open photo\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXfDYEmO7FU1jXfKY6mgbriJisyIqt8eb1lrp9h_x2a8j0Sa0f2T-4tl-iWyugV0ejnfar6O_Wq-3jp1HThuPm1Z6b9EF8gIwtEIilFzsDQfQPol5CiqsQxw_zTbuQ5nOOLzBfdrjtfqZ7hhn1V3JhIIyyUDXwgkGShcPo6tEviaESXrO2YM4w?key=tiMruqGRxQm4U_3yXZ21Qw\" width=\"190\" height=\"253\"><\/p>\n<\/div>\n<\/div>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"A black and grey machine with black wheels\n\nDescription automatically generated\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXd1eWqHua_WRL7ujpdU4oZtkmz3xNSIdqVBnOrd6JXPFPDpTJWBkcrWH66J1TWVQ6jcaU7TLhapXZ0tEWkAB8XoazSIjbwUBSq6KanOttyiCPeLwls5hCMmbNc_U-2FxKXsK4i7NLEwzDlADuVEko_PIEyqYUFA18ZM4iFsTQt8YG5Mf_gJQg?key=tiMruqGRxQm4U_3yXZ21Qw\" width=\"359\" height=\"207\"><\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"A machine with a wheel\n\nDescription automatically generated with medium confidence\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXcykVatAAMkf_ByDrFi0vvpnYHlFZ6O5U8tPL95I5uZt5z0tA2eJYFXCKaC9QxWgdus0jK_KNa7HgpFuMpjsW4Df36XFzaWG-k_U2oJLncfUNxpz-Kn64J4vqgljp5JS8MV5PtC-CR481NXCkXHfzqu6Er_XHM6azwvQkxzYvEyGywWpIl71oE?key=tiMruqGRxQm4U_3yXZ21Qw\" width=\"241\" height=\"374\"><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Sondre &#8211; Week 8<\/strong><\/p>\n\n\n\n<p>This week, I have same as last week, been participating in military exercise.&nbsp;<\/p>\n\n\n\n<p>I started to investigate and design a gear and rack for the stepper motor in SolidWorks.&nbsp;<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Jon-Eirik &#8211; Week 8<\/strong><\/p>\n\n\n\n<p>This week I worked with Kristian on Monday again. Our goal was to be able for all the 4 motors to work together. We have 2 motors who work on the same axis, 1 motor that works on the opposite axis and the last one that works to pick up the pieces.<\/p>\n\n\n\n<p>I also learned that the sensors we planned 2 weeks prior were not possible to order as it would take too much time to get here, so we talked with Steven and ended up ordering Neodymium magnets and Hall Linear sensors for our board.<br><br>These sensors work the same way as the KY-003 chips we were planning to use, so it\u2019s just a little more work soldering these together on our setup. They have 3 pins where pins 1 is for CVV, pin 2 is for GND and pin 3 is for Output. This is where we will read the state of the sensor to watch how the pieces on the board have been moved. The signal it sends helps our AI understand what move has been done and it can then calculate the best move it can do.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"328\" height=\"436\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-30.png\" alt=\"\" class=\"wp-image-9567\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-30.png 328w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-30-226x300.png 226w\" sizes=\"auto, (max-width: 328px) 100vw, 328px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"262\" height=\"240\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-31.png\" alt=\"\" class=\"wp-image-9568\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Kristian &#8211; Week 8<\/strong><\/p>\n\n\n\n<p>I started this week testing some code I had done the week before, but there was some trouble in paradise. I couldn&#8217;t fathom why the z axis motors didn&#8217;t move at all\u2026. Luckily Jon Eirik managed to find a couple stupid mistakes in the code regarding the motor setup for the z axis motor. After he found the mistakes, I corrected them, and the motors worked as intended.&nbsp;<\/p>\n\n\n\n<p>This week I decided to change the order of operation for the robot moving chess pieces. Before it would go:&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; Home -&gt; to chess piece -&gt; pick up -&gt; go home -&gt; go to destination for piece -&gt; put down -&gt; home<\/p>\n\n\n\n<p>now:&nbsp; &nbsp; Home -&gt; chess piece -&gt; pick up -&gt; destination -&gt; put down -&gt; home<\/p>\n\n\n\n<p>This is a much less time-consuming operation and will look way smoother.&nbsp;<\/p>\n\n\n\n<p>The robot couldn&#8217;t handle a situation where it had to take an opponent&#8217;s piece, but now it can. It can move a piece to an empty chess square or remove enemy chess piece and then moving its piece to the destination square (which held the opponent\u2019s piece)<\/p>\n\n\n\n<p>There is an if statement there that will later check if the destination square holds an opponent\u2019s piece. There is some code missing for the statement to work at this point, but when that piece of the code is implemented, the new code should work as expected.<\/p>\n\n\n\n<p>altered code:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"541\" height=\"1024\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-27-541x1024.png\" alt=\"\" class=\"wp-image-9563\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-27-541x1024.png 541w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-27-159x300.png 159w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-27.png 594w\" sizes=\"auto, (max-width: 541px) 100vw, 541px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"466\" height=\"1024\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-28-466x1024.png\" alt=\"\" class=\"wp-image-9564\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-28-466x1024.png 466w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-28-137x300.png 137w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-28.png 521w\" sizes=\"auto, (max-width: 466px) 100vw, 466px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"445\" height=\"1024\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-29-445x1024.png\" alt=\"\" class=\"wp-image-9565\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-29-445x1024.png 445w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-29-130x300.png 130w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-29.png 478w\" sizes=\"auto, (max-width: 445px) 100vw, 445px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Emil \u2013 Week 8<\/strong><\/p>\n\n\n\n<p>So, this week I\u2019ve been working on the code since last week to make it work. Now it\u2019s working and you can now easily put in all the coordinates or how far the 2 motors are supposed to go to reach each square. Same as last week we have 3 different arrays, one that has each position, a1, b2, c3 etc. Then we use that array to locate what position the square that we want is located in.<\/p>\n\n\n\n<p>My problem last time was that I couldn\u2019t get the proper values, now we do. What I needed to change was put the arrays for Xmotor and Ymotor in setup instead of inside the function. Then I had to create the values for Xcord and Ycord already in the function receivestockfishmove so that it could send this as well to the other function. Then I put a default value on Xcord and Ycord being -1 so I could know there is issues here. For the for loop, it\u2019s pretty much the same, only that I\u2019ve added so it does both motors instead of only one.<\/p>\n\n\n\n<p>The code:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"580\" height=\"801\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-33.png\" alt=\"\" class=\"wp-image-9571\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-33.png 580w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-33-217x300.png 217w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"483\" height=\"754\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-34.png\" alt=\"\" class=\"wp-image-9573\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-34.png 483w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-34-192x300.png 192w\" sizes=\"auto, (max-width: 483px) 100vw, 483px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"506\" height=\"714\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-35.png\" alt=\"\" class=\"wp-image-9574\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-35.png 506w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-35-213x300.png 213w\" sizes=\"auto, (max-width: 506px) 100vw, 506px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"497\" height=\"752\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-36.png\" alt=\"\" class=\"wp-image-9575\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-36.png 497w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-36-198x300.png 198w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"464\" height=\"761\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-37.png\" alt=\"\" class=\"wp-image-9576\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-37.png 464w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-37-183x300.png 183w\" sizes=\"auto, (max-width: 464px) 100vw, 464px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"486\" height=\"753\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-38.png\" alt=\"\" class=\"wp-image-9578\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-38.png 486w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-38-194x300.png 194w\" sizes=\"auto, (max-width: 486px) 100vw, 486px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"501\" height=\"636\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-39.png\" alt=\"\" class=\"wp-image-9579\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-39.png 501w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-39-236x300.png 236w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/figure>\n\n\n\n<p>Pictures of the program working: <\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-40-697x1024.png\" alt=\"\" class=\"wp-image-9623\" width=\"460\" height=\"675\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-40-697x1024.png 697w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-40-204x300.png 204w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-40-768x1129.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-40.png 798w\" sizes=\"auto, (max-width: 460px) 100vw, 460px\" \/><\/figure>\n\n\n\n<p>This is right before i send a move which is d7d5. And here is after:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-41.png\" alt=\"\" class=\"wp-image-9624\" width=\"450\" height=\"773\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-41.png 594w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-41-175x300.png 175w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/figure>\n\n\n\n<p>To test and show that everything works we can test with values a1 and h1, this should be values 1 and 8, wich it is.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-42-688x1024.png\" alt=\"\" class=\"wp-image-9626\" width=\"450\" height=\"669\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-42-688x1024.png 688w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-42-201x300.png 201w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-42-768x1143.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/bilde-42.png 808w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Ulrik &#8211; Week 8 The designing of the spacers and fittings for the gantry has been done this week and I have gotten them 3d Printed. I have assembled the gantry and added it to the V-profile, but the number of wheel-bearings needed was 2x, so I need 8 more for the other side. One [&hellip;]<\/p>\n","protected":false},"author":103,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9562","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/9562","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/users\/103"}],"replies":[{"embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9562"}],"version-history":[{"count":8,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/9562\/revisions"}],"predecessor-version":[{"id":9702,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/9562\/revisions\/9702"}],"wp:attachment":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9562"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9562"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}