{"id":1327,"date":"2015-09-23T02:52:54","date_gmt":"2015-09-23T01:52:54","guid":{"rendered":"http:\/\/quantum-bits.org\/?p=1327"},"modified":"2022-08-12T17:28:18","modified_gmt":"2022-08-12T16:28:18","slug":"e-v-e-has-a-sens-of-touch","status":"publish","type":"post","link":"https:\/\/www.quantum-bits.org\/?p=1327","title":{"rendered":"E.V.E has a sens of touch"},"content":{"rendered":"<p>Since our <a href=\"http:\/\/quantum-bits.org\/?p=1296\" target=\"_blank\" rel=\"noopener\">previous post<\/a>, the touchscreen and the stand I ordered at&nbsp;<a href=\"http:\/\/swag.raspberrypi.org\/\" target=\"_blank\" rel=\"noopener\">Swag shop<\/a> were delivered (this morning actually). It is now time for an unboxing and a first setup !<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-1297\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2015\/09\/rasbperrypi-hacks.jpg\" alt=\"rasbperrypi-hacks\" width=\"985\" height=\"503\" srcset=\"https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/rasbperrypi-hacks.jpg 985w, https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/rasbperrypi-hacks-300x153.jpg 300w\" sizes=\"(max-width: 985px) 100vw, 985px\" \/><\/p>\n<p><strong>The unboxing<\/strong><\/p>\n<p>Two packages were sent via Chronopost:<\/p>\n<ul>\n<li>A first one &#8211; a very sober white box with no label &#8211; containing the 7&#8243; touchscreen from <a href=\"http:\/\/www.element14.com\" target=\"_blank\" rel=\"noopener\">element14<\/a><\/li>\n<li>A second one &#8211; a smaller brown box &#8211; with the black stand from <a href=\"https:\/\/shop.pimoroni.com\/\" target=\"_blank\" rel=\"noopener\">Pimoroni<\/a><\/li>\n<\/ul>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-1328 size-full\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2015\/09\/unboxing.png\" alt=\"unboxing\" width=\"854\" height=\"288\" srcset=\"https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/unboxing.png 854w, https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/unboxing-300x101.png 300w\" sizes=\"(max-width: 854px) 100vw, 854px\" \/><\/p>\n<p>Let&#8217;s start with the 7&#8243; touchscreen. The package is composed of :<\/p>\n<ul>\n<li>a 7&#8243; touchscreen display<\/li>\n<li>an adapter board<\/li>\n<li>a white DSI&nbsp;ribbon cable<\/li>\n<li>a set of 4 jumper wires<\/li>\n<li>a set of 4 screws and a set of 4 stand-offs<\/li>\n<\/ul>\n<p>The finishing of the touchscreen seems to be quite good. It feels solid and is a little heavier than I thought it would be (when compared to the weight of a smartphone for example). Yet, fully assembled (including the stand and the raspberry pi itself), it weights about 260g. The screen is protected by a plastic film cover.<\/p>\n<p>There is no instruction provided. You are on your own, with is not unusual for a DIY electronic set. Constructing the kit is actually easy, and one can follow <a href=\"http:\/\/www.element14.com\/community\/docs\/DOC-78156?ICID=rpiaccsy-topban-learn#installI\" target=\"_blank\" rel=\"noopener\">online instructions<\/a>&nbsp;from Element14.<\/p>\n<p>During all the whole construction process, I kept the plastic film cover on and I&nbsp;sat the screen on a styrofoam&nbsp;to avoid any dammage.<\/p>\n<p>As a first step, one has to connect the wide orange display ribbon cable from the touchscreen to the back of the adapter board.&nbsp;This ribbon seems very fragile, so you&#8217;ll have&nbsp;be very gentle with it. First, one has to pull the small clamp, then push the ribbon in and push back the clamp to secure the connection.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-1335\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2015\/09\/steps1-2.png\" alt=\"steps1-2\" width=\"732\" height=\"298\" srcset=\"https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/steps1-2.png 732w, https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/steps1-2-300x122.png 300w\" sizes=\"(max-width: 732px) 100vw, 732px\" \/><\/p>\n<p>For the second step, one has to flip the board and connect the smaller orange ribbon cable to the connector on the top of the adapter board.<\/p>\n<p>The third step is quite easy:&nbsp;fixing the board to the screen with the four spacers.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-1338\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2015\/09\/steps3-4.png\" alt=\"steps3-4\" width=\"730\" height=\"298\" srcset=\"https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/steps3-4.png 730w, https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/steps3-4-300x122.png 300w\" sizes=\"(max-width: 730px) 100vw, 730px\" \/><\/p>\n<p>For the fourth step, turn the touchscreen 180\u00b0 and connect the white DSI ribbon cable to its connector on the side of the board (as shown on the above picture).<\/p>\n<p>The next step is&nbsp;connecting the jumper wires from the Raspberry Pi&#8217;s GPIO to the adapter board. The idea behind this connection is to share a same power supply (one can also power the display and the touchscreen separately). Only two jumper wires are needed to connect 5V and GND from the adapter board to the Raspberry Pi (pins 2 and 6) :<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-1339\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2015\/09\/gpio-touch.png\" alt=\"gpio-touch\" width=\"548\" height=\"324\" srcset=\"https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/gpio-touch.png 548w, https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/gpio-touch-300x177.png 300w\" sizes=\"(max-width: 548px) 100vw, 548px\" \/><\/p>\n<p>Once the jumper wires are connected, you can sit the Raspberry Pi on top of the adpater board and mount it to the 4 spacers with the provided screws:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-1341\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2015\/09\/steps5-6.png\" alt=\"steps5-6\" width=\"730\" height=\"298\" srcset=\"https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/steps5-6.png 730w, https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/steps5-6-300x122.png 300w\" sizes=\"(max-width: 730px) 100vw, 730px\" \/><\/p>\n<p>The last step is to connect the white DSI ribbon to the display connector on the side of the Raspberry Pi. And &#8230; we&#8217;re done. A piece of cake^H^H^H^H Pi(e) !<\/p>\n<p>I was at first a little worried about the power supply. I used an ordinary power supply for Raspberry Pi from Element14. I was wondering whether&nbsp;it could draw enough current&nbsp;for both the Pi and its touchscreen. And it turned out, yes :<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-1343\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2015\/09\/touchsreen-powerup.jpg\" alt=\"touchsreen-powerup\" width=\"1280\" height=\"960\" srcset=\"https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/touchsreen-powerup.jpg 1280w, https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/touchsreen-powerup-300x225.jpg 300w, https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/touchsreen-powerup-1024x768.jpg 1024w, https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/touchsreen-powerup-285x214.jpg 285w\" sizes=\"(max-width: 1280px) 100vw, 1280px\" \/><\/p>\n<p>Good !<\/p>\n<p><strong>The stand<\/strong><\/p>\n<p>The black stand from <a href=\"https:\/\/shop.pimoroni.com\/\" target=\"_blank\" rel=\"noopener\">Pimoroni<\/a>&nbsp;came with a nice instruction sheet. The first step is to remove the protective film from both sides of all the pieces:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-1345\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2015\/09\/stand-steps1-2.png\" alt=\"stand-steps1-2\" width=\"730\" height=\"298\" srcset=\"https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/stand-steps1-2.png 730w, https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/stand-steps1-2-300x122.png 300w\" sizes=\"(max-width: 730px) 100vw, 730px\" \/><\/p>\n<p>For the next step, place the touchscreen face down on a styrofoam and stack up the frames on top of it. To do this, one has actually to unscrew the Raspberry Pi from the adapter board (step 3), lay the frames and screw the Raspberry Pi back (step 4).<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-1346\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2015\/09\/stand-steps3-4-5.png\" alt=\"stand-steps3-4-5\" width=\"550\" height=\"268\" srcset=\"https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/stand-steps3-4-5.png 550w, https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/stand-steps3-4-5-300x146.png 300w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/p>\n<p>For the fifth step, you&#8217;ll have to align the locking stand plates over the rectangular cutouts, insert the stands into these cutouts, slide the locking stand plates upwards and screw in the 4 provided nylon bolt until the stands are secured. And that&#8217;s it !<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-1347\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2015\/09\/touch-constructed.png\" alt=\"touch-constructed\" width=\"730\" height=\"295\" srcset=\"https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/touch-constructed.png 730w, https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/touch-constructed-300x121.png 300w\" sizes=\"(max-width: 730px) 100vw, 730px\" \/><\/p>\n<p><strong>Testing the Touchscreen<\/strong><\/p>\n<p>Well &#8230; actually that wasn&#8217;t it ! Because when I powered up the Raspberry Pi, it appeared (unlike the above picture which was taken after I found a solution) the display was &#8230; upside down.<\/p>\n<p>So I dug into the <a href=\"https:\/\/www.raspberrypi.org\/documentation\/configuration\/config-txt.md\" target=\"_blank\" rel=\"noopener\">documentation<\/a> and found the&nbsp;<code>DISPLAY_ROTATE=2<\/code> option accessible from <code>\/boot\/config.txt<\/code>&nbsp;(the BIOS-like options for Raspberry Pi):<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-1349\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2015\/09\/display_rotate.png\" alt=\"display_rotate\" width=\"356\" height=\"233\" srcset=\"https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/display_rotate.png 356w, https:\/\/www.quantum-bits.org\/wp-content\/uploads\/2015\/09\/display_rotate-300x196.png 300w\" sizes=\"(max-width: 356px) 100vw, 356px\" \/><\/p>\n<p>At first, it looked like it did the trick. The screen was rotated 180\u00b0, but when I fired up X.org, even if the display wasn&#8217;t upside down, the touch events were in fact inverted: a touch on the right top corner was interpreted by a touch on the left bottom corner. Bummer&#8230;<\/p>\n<p>I tried to mess up with options from <code>xrandr<\/code> &#8230; with no luck. Then I found the <code>lcd_rotate=2<\/code> option in this <a href=\"https:\/\/www.raspberrypi.org\/forums\/viewtopic.php?f=108&amp;t=120856&amp;p=816826&amp;hilit=lcd_rotate\" target=\"_blank\" rel=\"noopener\">Raspberry Pi forum thread<\/a>.<\/p>\n<p>And that did it !<\/p>\n<p>Here is a very short video (sorry it is quite late) showing a crude implementation of E.V.E&#8217;s interfaces I sketched up last week:<\/p>\n<p>&nbsp;<\/p>\n<p><center><div style=\"width: 568px;\" class=\"wp-video\"><!--[if lt IE 9]><script>document.createElement('video');<\/script><![endif]-->\n<video class=\"wp-video-shortcode\" id=\"video-1327-1\" width=\"568\" height=\"320\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2015\/09\/touchscreen1.mp4?_=1\" \/><a href=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2015\/09\/touchscreen1.mp4\">http:\/\/quantum-bits.org\/wp-content\/uploads\/2015\/09\/touchscreen1.mp4<\/a><\/video><\/div><\/p>\n<p><\/center>&nbsp;<\/p>\n<p>There is still a long road ahead, but things are coming along nicely.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since our previous post, the touchscreen and the stand I ordered at&nbsp;Swag shop were delivered (this morning actually). It is now time for an unboxing and a first setup ! &#8230;<\/p>\n","protected":false},"author":1,"featured_media":3851,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0},"categories":[21],"tags":[],"_links":{"self":[{"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=\/wp\/v2\/posts\/1327"}],"collection":[{"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1327"}],"version-history":[{"count":0,"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=\/wp\/v2\/posts\/1327\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=\/wp\/v2\/media\/3851"}],"wp:attachment":[{"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}