{"id":140,"date":"2025-02-23T02:42:15","date_gmt":"2025-02-23T02:42:15","guid":{"rendered":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/?p=140"},"modified":"2025-02-23T04:36:00","modified_gmt":"2025-02-23T04:36:00","slug":"johns-status-report-for-2-22","status":"publish","type":"post","link":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/2025\/02\/23\/johns-status-report-for-2-22\/","title":{"rendered":"John&#8217;s Status Report for 2\/22"},"content":{"rendered":"<p><strong>Arduino-Electronics Interface<\/strong><\/p>\n<p>Since we received the Arduinos this week I spent time working on code to interface with the modules&#8217; electronic components. We&#8217;ll be using the Arduino Joystick library, which works with the Arduino Leonardo.<\/p>\n<p>The Arduino can be made visible as a game controller using the following initialization code:<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-155\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-content\/uploads\/sites\/353\/2025\/02\/init-1.png\" alt=\"\" width=\"1278\" height=\"300\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-content\/uploads\/sites\/353\/2025\/02\/init-1.png 1278w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-content\/uploads\/sites\/353\/2025\/02\/init-1-300x70.png 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-content\/uploads\/sites\/353\/2025\/02\/init-1-768x180.png 768w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-content\/uploads\/sites\/353\/2025\/02\/init-1-1024x240.png 1024w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/p>\n<p>Our code will dynamically check the ID pins and process the modules&#8217; data pins depending on which module is currently inserted:<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-154\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-content\/uploads\/sites\/353\/2025\/02\/input_process-1.png\" alt=\"\" width=\"1352\" height=\"598\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-content\/uploads\/sites\/353\/2025\/02\/input_process-1.png 1352w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-content\/uploads\/sites\/353\/2025\/02\/input_process-1-300x133.png 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-content\/uploads\/sites\/353\/2025\/02\/input_process-1-768x340.png 768w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-content\/uploads\/sites\/353\/2025\/02\/input_process-1-1024x453.png 1024w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/p>\n<p>For reading from the encoder, we have two options: polling or interrupts. The polling option is less complex but risks skipping transitions if the encoder is turned very quickly. Here is an interrupt service routine that reacts to encoder state changes:<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-157\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-content\/uploads\/sites\/353\/2025\/02\/encoder_isr.png\" alt=\"\" width=\"1024\" height=\"552\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-content\/uploads\/sites\/353\/2025\/02\/encoder_isr.png 1024w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-content\/uploads\/sites\/353\/2025\/02\/encoder_isr-300x162.png 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-content\/uploads\/sites\/353\/2025\/02\/encoder_isr-768x414.png 768w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/> The ISR is attached using <code>attachInterrupt(digitalPinToInterrupt(encoderPinA), encoderISR, CHANGE);<\/code><\/p>\n<p><strong>Progress and Next Week&#8217;s Deliverables<\/strong><\/p>\n<p>My progress is on track. Since we&#8217;ve now ordered all of our components, I&#8217;d like to get my code working with Unity by next week. If the Arduino-Unity integration goes well, I&#8217;d like to work on planning the spatial organization of the electronics within the modules.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Arduino-Electronics Interface Since we received the Arduinos this week I spent time working on code to interface with the modules&#8217; electronic components. We&#8217;ll be using the Arduino Joystick library, which works with the Arduino Leonardo. The Arduino can be made visible as a game controller using the following initialization code: Our code will dynamically check &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/2025\/02\/23\/johns-status-report-for-2-22\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;John&#8217;s Status Report for 2\/22&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1141,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[3],"_links":{"self":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-json\/wp\/v2\/posts\/140"}],"collection":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-json\/wp\/v2\/users\/1141"}],"replies":[{"embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-json\/wp\/v2\/comments?post=140"}],"version-history":[{"count":15,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-json\/wp\/v2\/posts\/140\/revisions"}],"predecessor-version":[{"id":167,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-json\/wp\/v2\/posts\/140\/revisions\/167"}],"wp:attachment":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-json\/wp\/v2\/media?parent=140"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-json\/wp\/v2\/categories?post=140"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamc3\/wp-json\/wp\/v2\/tags?post=140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}