{"id":1682,"date":"2015-06-02T14:21:55","date_gmt":"2015-06-02T12:21:55","guid":{"rendered":"http:\/\/www.parufito.info\/?p=1682"},"modified":"2015-09-18T10:17:07","modified_gmt":"2015-09-18T08:17:07","slug":"experiments-amb-raspberry-pi","status":"publish","type":"post","link":"https:\/\/www.parufito.info\/blog\/02062015\/experiments-amb-raspberry-pi\/","title":{"rendered":"Experiments amb Raspberry Pi"},"content":{"rendered":"<h2>Experiments amb PiTFT<\/h2>\n<h3>PiTft auto start x per la pantalla<\/h3>\n<div class=\"row-fluid build-text\">\n<p style=\"padding-left: 30px;\"><strong>Boot to X Windows on PiTFT<\/strong><\/p>\n<p style=\"padding-left: 30px;\">To enable booting straight to X windows on the PiTFT follow the steps below. \u00a0First make sure a display configuration which would conflict is <strong>not<\/strong> present by executing in a terminal on the Pi:<\/p>\n<pre style=\"padding-left: 30px;\"><span class=\"pln\">sudo mv <\/span><span class=\"pun\">\/<\/span><span class=\"pln\">usr<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">share<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">X11<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">xorg<\/span><span class=\"pun\">.<\/span><span class=\"pln\">conf<\/span><span class=\"pun\">.<\/span><span class=\"pln\">d<\/span><span class=\"pun\">\/<\/span><span class=\"lit\">99<\/span><span class=\"pun\">-<\/span><span class=\"pln\">fbturbo<\/span><span class=\"pun\">.<\/span><span class=\"pln\">conf <\/span><span class=\"pun\">~<\/span><\/pre>\n<\/div>\n<div class=\"row-fluid build-text\" style=\"padding-left: 30px;\">\n<p style=\"padding-left: 30px;\">Don&#8217;t worry if the command fails with an error that the file doesn&#8217;t exist. \u00a0This failure is normal and should happen on a good PiTFT install. \u00a0You can ignore it and move on.<\/p>\n<p style=\"padding-left: 30px;\">Next run the command below to open the nano text editor as root and create the file\u00a0<strong>\/usr\/share\/X11\/xorg.conf.d\/99-pitft.conf<\/strong>:<\/p>\n<pre style=\"padding-left: 30px;\"><span class=\"pln\">sudo nano <\/span><span class=\"pun\">\/<\/span><span class=\"pln\">usr<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">share<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">X11<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">xorg<\/span><span class=\"pun\">.<\/span><span class=\"pln\">conf<\/span><span class=\"pun\">.<\/span><span class=\"pln\">d<\/span><span class=\"pun\">\/<\/span><span class=\"lit\">99<\/span><span class=\"pun\">-<\/span><span class=\"pln\">pitft<\/span><span class=\"pun\">.<\/span><span class=\"pln\">conf<\/span><\/pre>\n<\/div>\n<div class=\"row-fluid build-text\" style=\"padding-left: 30px;\">\n<p style=\"padding-left: 30px;\">When the editor loads to a blank file, copy in the text below:<\/p>\n<pre style=\"padding-left: 60px;\"><span class=\"typ\">Section<\/span> <span class=\"typ\">\"Device\"\r\n    Identifier<\/span> <span class=\"typ\">\"Adafruit PiTFT\"\r\n    Driver<\/span> <span class=\"typ\">\"fbdev\"\r\n    Option<\/span> <span class=\"str\">\"fbdev\"<\/span> <span class=\"typ\">\"\/dev\/fb1\"\r\nEndSection<\/span><\/pre>\n<\/div>\n<div class=\"row-fluid build-text\" style=\"padding-left: 30px;\">\n<p style=\"padding-left: 30px;\">Then save the file by pressing <strong>Ctrl-O<\/strong> and then <strong>enter<\/strong>, and finally exit by pressing <strong>Ctrl-X<\/strong>.<\/p>\n<p style=\"padding-left: 30px;\">The step above will create a configuration file which tells X windows that it should use the PiTFT framebuffer (located at \/dev\/fb1) by default when it runs.<\/p>\n<p style=\"padding-left: 30px;\">At this point you can use the raspi-config tool to enable booting to desktop just like normal on the Pi. \u00a0Run the following command:<\/p>\n<pre style=\"padding-left: 30px;\"><span class=\"pln\">sudo raspi<\/span><span class=\"pun\">-<\/span><span class=\"pln\">config<\/span><\/pre>\n<\/div>\n<div class=\"row-fluid build-text\" style=\"padding-left: 30px;\">\n<p style=\"padding-left: 30px;\">Then pick the <strong>Enable Boot to Desktop\/Scratch<\/strong> option and choose if you want to boot to the console, desktop, or scratch environment. \u00a0After exiting the tool and rebooting you should see the Pi load X windows on the PiTFT after (be patient it can take around 30 seconds to load).<\/p>\n<p style=\"padding-left: 30px;\">If you want to disable booting to X, just use the raspi-config command again to choose the console boot option.<\/p>\n<\/div>\n<p><strong>Font:<\/strong> https:\/\/learn.adafruit.com\/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi?view=all<\/p>\n<p>Per Evitar el Screensaver<\/p>\n<p>He seguit aquest manual:<\/p>\n<p><a href=\"http:\/\/www.lifehacker.com.au\/2014\/11\/make-an-animated-gif-photo-frame-with-a-raspberry-pi\/\">www.lifehacker.com.au\/2014\/11\/make-an-animated-gif-photo-frame-with-a-raspberry-pi\/<\/a><\/p>\n<p>al fil de Adafruit diuen moltes coses m\u00e9s (a veure si m&#8217;aguanta el meu)<\/p>\n<p><a href=\"https:\/\/learn.adafruit.com\/raspi-animated-gif-picture-frame?view=all#making-changes\">https:\/\/learn.adafruit.com\/raspi-animated-gif-picture-frame?view=all#making-changes<\/a><\/p>\n<h3>\u00a0PiTFT amb PyGame Men\u00fa per escollir scripts t\u00e0ctil<\/h3>\n<ul>\n<li><a href=\"http:\/\/raspi.tv\/2014\/overlaying-text-and-graphics-on-a-photo-and-tweeting-it-pt-5-twitter-app-series\">http:\/\/raspi.tv\/2014\/overlaying-text-and-graphics-on-a-photo-and-tweeting-it-pt-5-twitter-app-series<\/a><\/li>\n<\/ul>\n<h2><strong>Experiments amb la C\u00e0mera<\/strong><\/h2>\n<h3>Streaming Web<\/h3>\n<p>Un altre experiment que he fet, \u00e9s el de muntar un streaming via web de la c\u00e0mera, aprofitant el RPi A+ i la c\u00e0mera infrarojos que m&#8217;he comprat. Aquest proc\u00e9s \u00e9s realment molt senzill, gr\u00e0cies a un manual que vaig trobar, configurarem MJPG per fer streaming via sequ\u00e8ncia d&#8217;imatges jpg (no v\u00eddeo) Amb auto execuci\u00f3 en enjegar el RPi.<\/p>\n<ul>\n<li>He fet servir aquest manual: <a href=\"http:\/\/blog.miguelgrinberg.com\/post\/how-to-build-and-run-mjpg-streamer-on-the-raspberry-pi\">http:\/\/blog.miguelgrinberg.com\/post\/how-to-build-and-run-mjpg-streamer-on-the-raspberry-pi<\/a><\/li>\n<li>Un altre manual: <a href=\"https:\/\/miguelmota.com\/blog\/raspberry-pi-camera-board-video-streaming\/\">https:\/\/miguelmota.com\/blog\/raspberry-pi-camera-board-video-streaming\/<\/a><\/li>\n<li>Amb MJPG: <a href=\"http:\/\/sourceforge.net\/projects\/mjpg-streamer\/\">http:\/\/sourceforge.net\/projects\/mjpg-streamer\/<\/a><\/li>\n<li>Executar a l&#8217;inici: <a href=\"http:\/\/www.instructables.com\/id\/Raspberry-Pi-Launch-Python-script-on-startup\/?ALLSTEPS\">http:\/\/www.instructables.com\/id\/Raspberry-Pi-Launch-Python-script-on-startup\/?ALLSTEPS<\/a><\/li>\n<\/ul>\n<p>Un altre experiment que voldr\u00e9 fer \u00e9s el de aconseguir el mateix, per\u00f2 amb stream de v\u00eddeo i poder-lo enviar a serveis com youtube.<\/p>\n<p>(Com que tinc l&#8217;entrada a mitges i no l&#8217;enllestir\u00e9, copio els enlla\u00e7os al respecte i au!)<\/p>\n<ul>\n<li>Muntar un niu d&#8217;ocells amb infrarojos: <a href=\"https:\/\/www.raspberrypi.org\/learning\/infrared-bird-box\/worksheet\/\">https:\/\/www.raspberrypi.org\/learning\/infrared-bird-box\/worksheet\/<\/a><\/li>\n<li>Emetre per streaming: <a href=\"https:\/\/www.raspberrypi.org\/learning\/infrared-bird-box\/worksheet2\/\">https:\/\/www.raspberrypi.org\/learning\/infrared-bird-box\/worksheet2\/<\/a><\/li>\n<li>Emetre a Youtube Live: <a href=\"http:\/\/www.reddit.com\/r\/raspberry_pi\/comments\/2ahzp2\/raspberry_pi_encoder_live_streaming_to_youtube\/\">http:\/\/www.reddit.com\/r\/raspberry_pi\/comments\/2ahzp2\/raspberry_pi_encoder_live_streaming_to_youtube\/<\/a><\/li>\n<li>Afegir marca d&#8217;aigua (Hora o data al v\u00eddeo): <a href=\"http:\/\/raspi.tv\/2014\/overlaying-text-and-graphics-on-a-photo-and-tweeting-it-pt-5-twitter-app-series\">http:\/\/raspi.tv\/2014\/overlaying-text-and-graphics-on-a-photo-and-tweeting-it-pt-5-twitter-app-series<\/a><\/li>\n<\/ul>\n<h2>XBMC<\/h2>\n<p>No t\u00e9 massa secret, per\u00f2 tenia una pestanya oberta amb un manual bastant complert, que no he pogut ni revisar. El publico a aqu\u00ed de moment<\/p>\n<ul>\n<li><a href=\"http:\/\/comohacer.eu\/media-center-raspberry-pi-kodi-openelec\/\">http:\/\/comohacer.eu\/media-center-raspberry-pi-kodi-openelec\/<\/a><\/li>\n<\/ul>\n<p>Afegeixo tamb\u00e9 uns altres manuals:<\/p>\n<ul>\n<li><a href=\"http:\/\/mymediaexperience.com\/raspberry-pi-xbmc-with-raspbmc\/\">The Only Raspberry Pi 2 Kodi (XBMC) Tutorial You Will Ever Need<\/a><\/li>\n<li><a href=\"http:\/\/www.htpcbeginner.com\/raspberry-pi-openelec-tweaks\/\">Buffer Issues<\/a> (punt 7)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Experiments amb PiTFT PiTft auto start x per la pantalla Boot to X Windows on PiTFT To enable booting straight to X windows on the PiTFT follow the steps below. \u00a0First make sure a display configuration which would conflict is not present by executing in a terminal on the Pi: sudo mv \/usr\/share\/X11\/xorg.conf.d\/99-fbturbo.conf ~ Don&#8217;t [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1744,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[262],"tags":[286,346,347,354,350,349,266,34],"class_list":["post-1682","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-raspberry-pi","tag-adafruit","tag-camera","tag-infrarojos","tag-openelec","tag-pibow","tag-pitft","tag-raspberry-pi-2","tag-xbmc"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.parufito.info\/blog\/wp-content\/uploads\/2015\/06\/raspberry.jpg","jetpack_shortlink":"https:\/\/wp.me\/pfudbs-r8","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.parufito.info\/blog\/wp-json\/wp\/v2\/posts\/1682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.parufito.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.parufito.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.parufito.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.parufito.info\/blog\/wp-json\/wp\/v2\/comments?post=1682"}],"version-history":[{"count":9,"href":"https:\/\/www.parufito.info\/blog\/wp-json\/wp\/v2\/posts\/1682\/revisions"}],"predecessor-version":[{"id":1773,"href":"https:\/\/www.parufito.info\/blog\/wp-json\/wp\/v2\/posts\/1682\/revisions\/1773"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.parufito.info\/blog\/wp-json\/wp\/v2\/media\/1744"}],"wp:attachment":[{"href":"https:\/\/www.parufito.info\/blog\/wp-json\/wp\/v2\/media?parent=1682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.parufito.info\/blog\/wp-json\/wp\/v2\/categories?post=1682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.parufito.info\/blog\/wp-json\/wp\/v2\/tags?post=1682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}