{"id":3616,"date":"2013-11-25T22:24:16","date_gmt":"2013-11-26T03:24:16","guid":{"rendered":"https:\/\/teach.alimomeni.net\/2013fall2\/?p=3616"},"modified":"2013-12-09T20:08:37","modified_gmt":"2013-12-10T01:08:37","slug":"final-project-milestone-3-ding-xu","status":"publish","type":"post","link":"https:\/\/teach.alimomeni.net\/2013fall2\/?p=3616","title":{"rendered":"Final Project Milestone 3 \u2013 Ding Xu"},"content":{"rendered":"<p>1. GPIO control board soldering<\/p>\n<p>In order to use GPIO of RPI for digital signal control, I built a control protoboard \u00a0with two switches and two push buttons connecting a pull-up\/pull-down registers respectively. A female header was used to connect the GPIO of RPI to get the digital signal.<\/p>\n<p>In RPI, I used the library WiringPi for GPIO signal reading. After compiling this library and include the header files, three easy steps are used to read the data from digital pins: (1).\u00a0wiringPiSetup() (2). set up pinmode: PinMode(GPIOX,INPUT) and (3).\u00a0digitalRead(GPIOX) or\u00a0digitalWrite(GPIOX)<\/p>\n<p><a href=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_71.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3623\" alt=\"photo_7(1)\" src=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_71.jpg\" width=\"500\" height=\"375\" srcset=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_71.jpg 500w, https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_71-300x225.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>2. software design<\/p>\n<p>In openframeworks, I used \u00a0the library Sndfile for recording and\u00a0ofSoundPlayer for sound output. There are two modes: capture and play. Users are expected to record as many as sounds in their lives and take an image each time recording a sound. Then in the play mode, the camera will capture a surrounding image and the sound tracks of similar images will be played.\u00a0\u00a0The software workflow is as follows:<\/p>\n<p>Capture:<br \/>\n<img decoding=\"async\" alt=\"\" src=\"https:\/\/docs.google.com\/drawings\/d\/1mRVkUOW1Hh3suTo2ZEFV555MdQTJjGKuVbXtKfDx-8M\/pub?w=480&amp;h=360\" \/><br \/>\nPlay:<br \/>\n<img decoding=\"async\" alt=\"\" src=\"https:\/\/docs.google.com\/drawings\/d\/1vGNs_LZudUHYcrJW48eXYwzs9N70CQ0sqfq-r3mjzcU\/pub?w=500&amp;h=360\" \/><\/p>\n<p><a href=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/code.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3832\" alt=\"code\" src=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/code.png\" width=\"500\" height=\"326\" srcset=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/code.png 500w, https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/code-300x195.png 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>3. system combination<\/p>\n<p>Connecting the sound input\/output device, RPI, singal control board and camera, the system is as follows:<\/p>\n<p><a href=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_31.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3624\" alt=\"photo_31\" src=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_31.jpg\" width=\"500\" height=\"667\" srcset=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_31.jpg 500w, https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_31-224x300.jpg 224w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo30.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3625\" alt=\"photo30\" src=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo30.jpg\" width=\"500\" height=\"667\" srcset=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo30.jpg 500w, https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo30-224x300.jpg 224w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/player.vimeo.com\/video\/80176669\" height=\"281\" width=\"500\" allowfullscreen=\"\" frameborder=\"0\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. GPIO control board soldering In order to use GPIO of RPI for digital signal control, I built a control protoboard \u00a0with two switches and two push buttons connecting a pull-up\/pull-down registers respectively. A female header was used to connect the GPIO of RPI to get the digital signal. In RPI, I used the library [&hellip;]<\/p>\n","protected":false},"author":60,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50,23,59,60],"tags":[],"coauthors":[],"class_list":["post-3616","post","type-post","status-publish","format-standard","hentry","category-audio","category-final-project","category-machine-vision","category-opencv"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=\/wp\/v2\/posts\/3616","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=\/wp\/v2\/users\/60"}],"replies":[{"embeddable":true,"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3616"}],"version-history":[{"count":4,"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=\/wp\/v2\/posts\/3616\/revisions"}],"predecessor-version":[{"id":3833,"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=\/wp\/v2\/posts\/3616\/revisions\/3833"}],"wp:attachment":[{"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3616"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=%2Fwp%2Fv2%2Fcoauthors&post=3616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}