{"id":523,"date":"2014-04-08T01:32:33","date_gmt":"2014-04-08T01:32:33","guid":{"rendered":"https:\/\/www.p-brane.com\/nm\/?p=523"},"modified":"2014-04-08T01:34:15","modified_gmt":"2014-04-08T01:34:15","slug":"raspberry-pi-touch-screen-display-lights-up","status":"publish","type":"post","link":"https:\/\/www.p-brane.com\/nm\/raspberry-pi-touch-screen-display-lights-up\/","title":{"rendered":"Raspberry Pi touch screen display lights up"},"content":{"rendered":"<p>Installing the kernel and drivers to get the Adafruit 2.8 inch touch screen operation was more involved than I expected, but it is working. It just need some tweaking to set it up so that the GUI can be used more easily. The RPi seems to be set up for a 1080&#215;760 monitor but the touch screen is only 320 by 240. At least one configuration file will likely need updating to make the background and applications windows fit better.<\/p>\n<p>I used the <a title=\"Linke to the Adafruit Occidentalis v0.2 kernel\" href=\"https:\/\/learn.adafruit.com\/adafruit-raspberry-pi-educational-linux-distro\/occidentalis-v0-dot-2\">Occidentalis v0.2<\/a> kernel build as described in the Adafruit instructions for the <a title=\"Link to the Adafruit PiTFT display assembly and software installation instructions\" href=\"https:\/\/learn.adafruit.com\/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi?view=all\">PiTFT touch screen<\/a>. The instruction have you build a new kernel so it takes a while to get it running. After building the new kernel, the Wolfram language package needs to be installed as the Wolfram language only comes pre-installed in the Rasbian distribution in the NOOBS loader. This went smoothly but I&#8217;ve had one of my CDFs crash Mathematic so some troubleshooting is still required.<\/p>\n<p>The RPi distribution via NOOBS seemed to be faster and more responsive than this version when it was first installed. The Ethernet adapter was not set up to run automatically, and the wireless interface was not configured to connect to hidden station IDs. Changes to the Interfaces configuration file enabled the Ethernet port. Later updates to this file, enabled a wireless connection too. After upgrading the packages, it seems to be much more responsive.\u00a0 The photos below show the display just after boot into x-windows and with the Fermi-Distribution function notebook running in Mathematica.<\/p>\n<div tabindex=\"0\" class=\"cycloneslider cycloneslider-template-standard cycloneslider-width-responsive\" id=\"cycloneslider-raspberry-pi-touch-screen-operational-mostly-1\" style=\"max-width:960px\" >\n<div class=\"cycloneslider-slides cycle-slideshow\" data-cycle-allow-wrap=\"true\" data-cycle-dynamic-height=\"off\" data-cycle-auto-height=\"960:600\" data-cycle-auto-height-easing=\"null\" data-cycle-auto-height-speed=\"250\" data-cycle-delay=\"0\" data-cycle-easing=\"\" data-cycle-fx=\"none\" data-cycle-hide-non-active=\"true\" data-cycle-log=\"false\" data-cycle-next=\"#cycloneslider-raspberry-pi-touch-screen-operational-mostly-1 .cycloneslider-next\" data-cycle-pager=\"#cycloneslider-raspberry-pi-touch-screen-operational-mostly-1 .cycloneslider-pager\" data-cycle-pause-on-hover=\"true\" data-cycle-prev=\"#cycloneslider-raspberry-pi-touch-screen-operational-mostly-1 .cycloneslider-prev\" data-cycle-slides=\"&gt; div\" data-cycle-speed=\"1000\" data-cycle-swipe=\"1\" data-cycle-tile-count=\"7\" data-cycle-tile-delay=\"100\" data-cycle-tile-vertical=\"true\" data-cycle-timeout=\"2000\" >\n<div class=\"cycloneslider-slide cycloneslider-slide-image\" > <img src=\"https:\/\/www.p-brane.com\/nm\/wp-content\/uploads\/2014\/04\/20140407_160242-960x600.jpg\" alt=\"\" title=\"\" \/> <\/p>\n<div class=\"cycloneslider-caption\">\n<div class=\"cycloneslider-caption-title\">Raspberry Pi with an Adafruit PiTFT 2.8 in touch screen running in x-windows mode<\/div>\n<div class=\"cycloneslider-caption-description\">Raspberry Pi with an Adafruit PiTFT 2.8 in touch screen running in x-windows mode.<\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div class=\"cycloneslider-slide cycloneslider-slide-image\" > <img src=\"https:\/\/www.p-brane.com\/nm\/wp-content\/uploads\/2014\/04\/20140407_160103-960x600.jpg\" alt=\"\" title=\"\" \/> <\/p>\n<div class=\"cycloneslider-caption\">\n<div class=\"cycloneslider-caption-title\">Raspberry Pi with an Adafruit PiTFT 2.8 in touch screen running in x-windows mode showing a Mathematica notebook running<\/div>\n<div class=\"cycloneslider-caption-description\">Raspberry Pi with an Adafruit PiTFT 2.8 in touch screen running in x-windows mode showing a Mathematica notebook running.<\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div class=\"cycloneslider-pager\"><\/div>\n<p> <a href=\"#\" class=\"cycloneslider-prev\"> <span class=\"arrow\"><\/span> <\/a> <a href=\"#\" class=\"cycloneslider-next\"> <span class=\"arrow\"><\/span> <\/a> <\/div>\n<p>It&#8217;s easier for me to use and remember operations in a GUI like Windows XP rather then a command string operation system like Linux so I keep a cheat sheet of command. These commands were used repeatedly for this activity and are listed below.<\/p>\n<p><b>Updating the Raspbian<\/b><\/p>\n<pre style=\"padding-left: 30px;\">sudo apt-get update\r\nsudo apt-get upgrade<\/pre>\n<p><b>Firmware updates<\/b><br \/>\nUpdating the firmware on the RPi requires the <a href=\"https:\/\/github.com\/Hexxeh\/rpi-update\">rpi-update tool<\/a>. The tool is on github along with the direction for installing it.<\/p>\n<pre style=\"padding-left: 30px;\">sudo apt-get install git-core\r\nsudo wget https:\/\/raw.github.com\/Hexxeh\/rpi-update\/master\/rpi-update -O \/usr\/bin\/rpi-update &amp;&amp; sudo chmod +x \/usr\/bin\/rpi-update\r\nsudo rpi-update<\/pre>\n<p>The rpi-update will rebuild a new kernel. It might take a little while. When it completes, then reboot the RPi.<\/p>\n<p><b>Shutdown and reboot<\/b><br \/>\nFrom an x-windows session or command line, use<\/p>\n<pre style=\"padding-left: 30px;\">sudo shutdown \u2013h now (to shutdown and halt. Restart by cycling the power to the RPi)\r\n or\r\nsudo shutdown \u2013r now (to reboot the RPi).<\/pre>\n<p><b>Device driver location<\/b><br \/>\nIf the build worked correctly, then \/dev should contain two new SPI devices<\/p>\n<ul>\n<li>spidev0.0<\/li>\n<li>spidev0.1<\/li>\n<\/ul>\n<p>Brian\u2019s life blog has another good description on how to install the <a href=\"http:\/\/www.brianhensley.net\/2012\/07\/getting-spi-working-on-raspberry-pi.html\">SPI drivers<\/a> and use them.<\/p>\n<p><b>Wireless adapter driver installation<\/b><br \/>\nSee the eLinux.org wiki about <a href=\"http:\/\/elinux.org\/RPi_USB_Wi-Fi_Adapters\">USB wireless adapters<\/a> and installing the drivers.<\/p>\n<pre style=\"padding-left: 30px;\">lsusb shows the devices connected to the USB ports\r\nlsmod shows the modules installed<\/pre>\n<p>Edit \/etc\/network\/interfaces using the nano editor and add the following if not already present for access to a hidden network (see <a href=\"http:\/\/www.dafinga.net\/2013\/01\/how-to-setup-raspberry-pi-with-hidden.html\">How to setup a Raspberry Pi with a hidden network using a Edimax EW-7811Un<\/a>).<\/p>\n<pre style=\"padding-left: 30px;\">auto lo\r\n iface lo inet loopback<\/pre>\n<pre style=\"padding-left: 30px;\">iface eth0 inet dhcp<\/pre>\n<pre style=\"padding-left: 30px;\">auto wlan0\r\n allow-hotplug wlan0\r\n iface wlan0 inet dhcp\r\n wpa-scan-ssid 1\r\n wpa-ap-scan 1\r\n wpa-key-mgmt WPA-PSK\r\n wpa-proto RSN WPA\r\n wpa-pairwise CCMP TKIP\r\n wpa-group CCMP TKIP\r\n wpa-ssid \u201cYour Wifi SSID\u201d\r\n wpa-psk \"Your PSK Value&amp;gt\"<\/pre>\n<pre style=\"padding-left: 30px;\">iface default inet dhcp<\/pre>\n<p>Then output and exit and restart the configuration<\/p>\n<pre style=\"padding-left: 30px;\">sudo \/etc\/init.d\/networking restart<\/pre>\n<p><b>Remote access<\/b><br \/>\nFirst, generate new RSA key (see <a href=\"http:\/\/elinux.org\/RPi_Remote_Access\">Remote Access<\/a> from eLinux.org).<\/p>\n<pre style=\"padding-left: 30px;\">sudo rm \/etc\/ssh\/ssh_host_* &amp;&amp; sudo dpkg-reconfigure openssh-server<\/pre>\n<p>Then from windows, use Putty or from Linux use ssh<\/p>\n<pre style=\"padding-left: 30px;\">ssh ip-address \u2013l username\r\n or\r\nssh \u2013X ip-address \u2013l username<\/pre>\n<p>to open using the x-windows server in Linux or a x-winders server in Windows. The x-window server must be installed on Windows first before starting an x-session.<\/p>\n<p><b>Installing Mathematica<\/b><\/p>\n<pre style=\"padding-left: 30px;\">\u00a0sudo apt-get update &amp;&amp; sudo apt-get install wolfram-engine<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Installing the kernel and drivers to get the Adafruit 2.8 inch touch screen operation was more involved than I expected, but it is working. It just need some tweaking to set it up so that the GUI can be used more easily. The RPi seems to be set up for a 1080&#215;760 monitor but the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,19,20,37,4,52],"tags":[39,54,38,53],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.p-brane.com\/nm\/wp-json\/wp\/v2\/posts\/523"}],"collection":[{"href":"https:\/\/www.p-brane.com\/nm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.p-brane.com\/nm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.p-brane.com\/nm\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.p-brane.com\/nm\/wp-json\/wp\/v2\/comments?post=523"}],"version-history":[{"count":12,"href":"https:\/\/www.p-brane.com\/nm\/wp-json\/wp\/v2\/posts\/523\/revisions"}],"predecessor-version":[{"id":535,"href":"https:\/\/www.p-brane.com\/nm\/wp-json\/wp\/v2\/posts\/523\/revisions\/535"}],"wp:attachment":[{"href":"https:\/\/www.p-brane.com\/nm\/wp-json\/wp\/v2\/media?parent=523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.p-brane.com\/nm\/wp-json\/wp\/v2\/categories?post=523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.p-brane.com\/nm\/wp-json\/wp\/v2\/tags?post=523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}