{"id":3708,"date":"2019-11-18T00:04:00","date_gmt":"2019-11-17T23:04:00","guid":{"rendered":"http:\/\/dronesonen.usn.no\/?p=3708"},"modified":"2019-12-05T08:22:14","modified_gmt":"2019-12-05T07:22:14","slug":"haptix-week-46","status":"publish","type":"post","link":"https:\/\/dronesonen.usn.no\/?p=3708","title":{"rendered":"Haptix week 46"},"content":{"rendered":"\n<p><strong>Petter:<\/strong><\/p>\n\n\n\n<p>\n\nI\u2019m&nbsp;continuing&nbsp;the&nbsp;work&nbsp;on&nbsp;the&nbsp;input system&nbsp;of&nbsp;the&nbsp;cube. It&nbsp;was&nbsp;more&nbsp;comprehensive&nbsp;than&nbsp;anticipated&nbsp;so I have spent my time,&nbsp;discussing&nbsp;and&nbsp;trying&nbsp;out&nbsp;different&nbsp;options&nbsp;as&nbsp;well&nbsp;as&nbsp;gathering&nbsp;info from&nbsp;more&nbsp;experienced&nbsp;users&nbsp;of&nbsp;unity.&nbsp;\n\n<\/p>\n\n\n\n<p><strong>William:<\/strong>&nbsp;<\/p>\n\n\n\n<p>\n\nI have done&nbsp;research&nbsp;on&nbsp;how&nbsp;to&nbsp;implement&nbsp;a&nbsp;scoreboard&nbsp;from&nbsp;Unity&nbsp;to a database.&nbsp;Also&nbsp;been&nbsp;working&nbsp;on&nbsp;the&nbsp;scoreboard&nbsp;in&nbsp;Unity, I have an&nbsp;idea&nbsp;how&nbsp;I&nbsp;want&nbsp;it to be&nbsp;implementet&nbsp;and&nbsp;lookwise.&nbsp;We&nbsp;had&nbsp;a&nbsp;meeting&nbsp;on&nbsp;thursday&nbsp;where&nbsp;I&nbsp;had&nbsp;futher&nbsp;discussions&nbsp;with&nbsp;Even.&nbsp;\n\n<\/p>\n\n\n\n<p><strong>Herman<\/strong> <strong>&amp; Tom Erik:<\/strong><\/p>\n\n\n\n<p> We\u2019ve been discussing the specifics of the physical design elements and obtain all necessary tools. Work is still being done on refining the sensory circuitry of the system.&nbsp; <\/p>\n\n\n\n<p>This week Herman and Daniel set up the link between Arduino and\nunity with protocols for communication. We decided that the easiest way was to\nsend a string with several digits to decide which finger that is doing what and\nwhat to do. The first digit describes the finger and the second the Boolean action\nof on or off. &nbsp;The most natural way to order\nthe fingers would either be between 0-9 or 1-10, but we decided to order them\nafter which pin the corresponded to and therefore scales between 2-11. Example of\nthis would be if you where to say that finger 8 where to touch something the Arduino\nwould receive a message like 9 1 \/n and when the finger detach the Arduino would\nreceive 9 0 \/n. <\/p>\n\n\n\n<p>The system has been made with some \u201csecurity\u201d measurements,\nwhere it\u2019s a timer in place to shut off the vibration if loss of connection and\nmeasurements to track whether the message was a valid message meant for the Arduino.\n<\/p>\n\n\n\n<p><strong>Daniel:<\/strong><\/p>\n\n\n\n<p>For\u00a0this\u00a0week\u00a0I have\u00a0updated\u00a0the\u00a0code\u00a0I\u00a0did\u00a0for\u00a0the\u00a0serial\u00a0controller\u00a0in\u00a0the\u00a0previous\u00a0week.\u00a0Where\u00a0I\u00a0cleaned it up\u00a0through\u00a0such\u00a0as\u00a0PascalCase,\u00a0clear\u00a0naming\u00a0and\u00a0the\u00a0removal\u00a0of\u00a0unecessary\u00a0code.\u00a0Switched\u00a0from\u00a0Queue.synchronized\u00a0to\u00a0ConcurrentQueue. Even\u00a0though\u00a0both\u00a0are\u00a0thread\u00a0safe,\u00a0the\u00a0ConcurrentQueue\u00a0is more\u00a0modern\u00a0and a bit faster (thanks Steven!).\u00a0Furthermore, I\u00a0also\u00a0added\u00a0some\u00a0standarized\u00a0protocols\u00a0for\u00a0the\u00a0communication\u00a0between\u00a0the\u00a0Arduino\u00a0and\u00a0Unity.\u00a0<\/p>\n\n\n\n<p>The serial controller&nbsp;program&nbsp;can&nbsp;be&nbsp;seen&nbsp;here:&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/serialcontroller-303x1024.png\" alt=\"\" class=\"wp-image-3709\" width=\"617\" height=\"2085\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/serialcontroller-303x1024.png 303w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/serialcontroller-89x300.png 89w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/serialcontroller-768x2597.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/serialcontroller.png 1444w\" sizes=\"auto, (max-width: 617px) 100vw, 617px\" \/><\/figure>\n\n\n\n<p>I also bought some white gloves that can be detected by the Leap Motion. As well as write a little .ino program for the Arduino, which could be tested on the <a href=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/BREADBORD.png\">debug platform<\/a> I built with LED lights. In order to test the scripts that were written for Unity application.  A video for this can be seen here:<\/p>\n\n\n\n<figure class=\"wp-block-embed-vimeo wp-block-embed is-type-video is-provider-vimeo wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"haptix\" src=\"https:\/\/player.vimeo.com\/video\/373754385?dnt=1&amp;app_id=122963\" width=\"500\" height=\"281\" frameborder=\"0\" allow=\"autoplay; fullscreen; picture-in-picture; clipboard-write; encrypted-media; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>Out from the video it can be seen that the LED diode corresponding with the fingerID lights up once a collision on the finger is detected in Unity. As soon as the finger is removed, the LED diode is set to LOW.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Petter: I\u2019m&nbsp;continuing&nbsp;the&nbsp;work&nbsp;on&nbsp;the&nbsp;input system&nbsp;of&nbsp;the&nbsp;cube. It&nbsp;was&nbsp;more&nbsp;comprehensive&nbsp;than&nbsp;anticipated&nbsp;so I have spent my time,&nbsp;discussing&nbsp;and&nbsp;trying&nbsp;out&nbsp;different&nbsp;options&nbsp;as&nbsp;well&nbsp;as&nbsp;gathering&nbsp;info from&nbsp;more&nbsp;experienced&nbsp;users&nbsp;of&nbsp;unity.&nbsp; William:&nbsp; I have done&nbsp;research&nbsp;on&nbsp;how&nbsp;to&nbsp;implement&nbsp;a&nbsp;scoreboard&nbsp;from&nbsp;Unity&nbsp;to a database.&nbsp;Also&nbsp;been&nbsp;working&nbsp;on&nbsp;the&nbsp;scoreboard&nbsp;in&nbsp;Unity, I have an&nbsp;idea&nbsp;how&nbsp;I&nbsp;want&nbsp;it to be&nbsp;implementet&nbsp;and&nbsp;lookwise.&nbsp;We&nbsp;had&nbsp;a&nbsp;meeting&nbsp;on&nbsp;thursday&nbsp;where&nbsp;I&nbsp;had&nbsp;futher&nbsp;discussions&nbsp;with&nbsp;Even.&nbsp; Herman &amp; Tom Erik: We\u2019ve been discussing the specifics of the physical design elements and obtain all necessary tools. Work is still being done on refining the sensory circuitry of the system.&nbsp; This week [&hellip;]<\/p>\n","protected":false},"author":72,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59,1],"tags":[],"class_list":["post-3708","post","type-post","status-publish","format-standard","hentry","category-haptix","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/3708","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\/72"}],"replies":[{"embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3708"}],"version-history":[{"count":11,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/3708\/revisions"}],"predecessor-version":[{"id":3848,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/3708\/revisions\/3848"}],"wp:attachment":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3708"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3708"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3708"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}