adafruit tft display raspberry pi quotation
I just wanted to share that I"ve soldered an Adafruit 1.8" TFT (http://adafruit.com/products/358) onto an Adafruit Proto Pi Plate (http://adafruit.com/products/801) and written code to display some info on it from the Pi. I"ve uploaded a video of it in action to http://www.flickr.com/photos/ngreatorex/7672743302/. I used pygame to produce the simple display show in the video.
It is quite simple to wire up. It"s very similar to the Arduino (see http://learn.adafruit.com/1-8-tft-displ ... spi-wiring). Instead of using the Arduino pin numbers, you use the Raspberry Pi pin numbers as found at http://elinux.org/images/2/2a/GPIOs.png. For the TFT_CS and D/C pins, you should just pick unused GPIOs and ensure they are referenced in the code.
Are you using Kamal"s code? My original code won"t work with fbterm. Kamal has fixed this in his branch at https://github.com/kamalmostafa/raspberrypi-linux.
Over the last few days I"ve been trying to get the 1.8" LCD working with the RPi for a project that I"m working on as it"ll mean I can possibly eliminate the use of an Atmel MCU / Arduino. However I"ve had no such luck with the ST7735 driver.
So far I"ve attempted to compile Kamal"s branch using the Occidentals 0.2 distro aswell as the wheezy-raspbian (2012-10-28). I"ve followed Kamal"s guide from "Configuring the kernel build", which goes through asking questions about configuring the ST7735 driver. I"ve used the same GPIO"s as Kamal for RST/DC, and just hit enter on the others. Even wired up the LCD the same.
Would anybody care to help as it"s about my 3rd-4th compile of the kernel, and I"m doing it directly on the RPi which takes a good part of a day to do.
Would anybody care to help as it"s about my 3rd-4th compile of the kernel, and I"m doing it directly on the RPi which takes a good part of a day to do.
Though you guys would most likely want some dump of my setup. My latest attempt has been with wheezy distro and Kamal"s branch. To setup the config I did as per his guide and used "make bcmrpi_defconfig", followed by the SED command to modify the config file so that the make oldconfig would run through setup questions relating to the ST7735.
This is an issue that I"ve been discussing with Kamal. The problem is that if you build in the ST7735 driver you also have to build in the BCM2708 SPI driver.
This is an issue that I"ve been discussing with Kamal. The problem is that if you build in the ST7735 driver you also have to build in the BCM2708 SPI driver.
This is an issue that I"ve been discussing with Kamal. The problem is that if you build in the ST7735 driver you also have to build in the BCM2708 SPI driver.
Neil, not long been up but read it this morning. Haven"t been able to try it as I"ll have to build the kernel again on the RPi and as yet don"t have any other nix dev platform to work on. Just in the process of grabbing mint and get my laptop setup as I"m sick of 8-11 hour build times
Just an update. Followed Mark"s guide and cross compiled the kernel with the drivers as modules on my laptop and copied them across and now have the hobbit trailer running on the RPi.
Have recompiled so that spi_bcm2708 and st7735 are builtin to the kernel. Have had success with fbterm displaying the login and using mplayer. However still no luck with fbcon, adding the options to cmdline.txt seems to prevent the RPi from booting. Have checked .config and fbcon seems to be builtin:
And, as Neil mentioned, whenever you build the st7735 pair as built-ins you also need SPI_BCM2708 to be built-in... Currently, you must manually set CONFIG_SPI_BCM2708 to "=y". We"re working on determining a proper way to get that bit to happen automatically.
Since following Mark"s guide into building the kernel with the drivers as modules I followed Neil"s initial advice about changing CONFIG_SPI_BCM2708 to "Y" instead of "M" so that it"s a builtin. Did the same for the ST7735 driver aswell and rebuilt the kernel on the laptop. Which is great as the compile times don"t take all day
As for fbcon, I"m using the settings that you posted on your page and did wonder if it was due to the .config settings for font of 8x8 and 8x16 preventing it from booting. I was going to attempt to change the cmdline.txt to 8x8 or 8x16 as an easy fix to test if that was the problem without having to rebuild the kernel. I"m not sure what is happening when I use fbcon, all I know is that when I add the lines to cmdline.txt and restart the RPi it then is unreachable via SSH. I could hook it upto the TV but it would mean rooting around and removing HDMI cables from the XBox, going to see if I can get a cheapy HDMI cable off eBay.
I"ve been getting a bit sidetracked and have been writing some test C/C++ code to display pixels on the framebuffer device. Seems to be working fine. Have noticed with the code that I"m using that the device gets returned as 16bpp in an RGB565 format. I know the LCD is sold as 18bit but I"m guessing the driver makes the fbdev into 16bit for some reason.
Just remembered something aswell, in the example you had "fbcon=map:10 fbcon=rotate:1 fbcon=font:ProFont6x11". After reading some docs on fbcon, I did wonder if the map was right as I would of thought to get tty1 to display on fb1 shouldn"t it be "fbcon=map:11"?
With con2fbmap I"ve been using 1 0, 1 1 and a variety of other options to try and get it to to work. After hitting enter the cursor isn"t returned to the CLI and you can"t do anything. FYI, I am trying to run con2fbmap from an SSH session with the RPi. Perhaps having the RPi plugged in via HDMI to a TV and executing con2fbmap directly would work.
Just remembered something aswell, in the example you had "fbcon=map:10 fbcon=rotate:1 fbcon=font:ProFont6x11". After reading some docs on fbcon, I did wonder if the map was right as I would of thought to get tty1 to display on fb1 shouldn"t it be "fbcon=map:11"?
No, my suggested map setting (fbcon=map:10) is correct: it maps tty1 to fb1 (the ST7735 panel) and tty2 to fb0 (the Pi"s native GPU framebuffer). See http://www.kernel.org/doc/Documentation/fb/fbcon.txt for more details.
With con2fbmap I"ve been using 1 0, 1 1 and a variety of other options to try and get it to to work. After hitting enter the cursor isn"t returned to the CLI and you can"t do anything. FYI, I am trying to run con2fbmap from an SSH session with the RPi. Perhaps having the RPi plugged in via HDMI to a TV and executing con2fbmap directly would work.
Finally (and most importantly)... Do you have my latest version of the driver source? (I suspect not, since the latest version would have enabled those font configs automatically for you). I updated my github branch with some important fbcon fixes within the past few days. The current latest version is commit 247163d79e... from https://github.com/kamalmostafa/raspberrypi-linux.git.
The pitft helper program will not work on Kali 2.0.X due to it being Sana (Debian Jessie, I think) and the helper was made only to work on Whezzy. There are also several packages that are need to be installed but not in the default repository.
The TFT isn’t ‘plug & play’ with the Raspberry, a patch has to be applied to the kernel to be able to interface via SPI with the ST7735R controller chip on the TFT. Once working, the display will act as a framebuffer device.
As it takes over three hours to compile the kernel on the PI, I will show how to cross compile from another Linux PC. In my case, it is Ubuntu 12.10 running within VMWare on a Windows 7 Quad core PC. Kernel compile time is 15 mins.
-Copy config from the Raspberry Pi to the Ubuntu box using SCP. Replace ‘raspberrypi’ below with the IP address of your Raspberry Pi if hostname lookup fails.
If you are planning on displaying the console on the TFT, then enabling these options in .config will allow you to change the font size and rotate the display later on.
To enable parallel processing for a faster compile. If you have a dual core processor add -j 3 to the end of the command below. If you have quad core, add -j 6
The last step below is to SCP the files from from Ubuntu to the Raspberry Pi. If you have trouble SCPing into your Ubuntu box you may need to install open SSH on Ubuntu with sudo apt-get install openssh-server. This step also copies the files from my home folder ‘mark’… yours would be different.
If you build the st7735 driver pair as built-in, add these options to the end of the line in /boot/cmdline.txt. This will display the console on the TFT.
The PiTFT Plus is a 480 x 320, 3.5 inch touchscreen TFT that has been designed for use with the Raspberry Pi Zero, Pi 2, 3 & 4 and models A+ and B+ (any Pi with a 2 x20 connector). The 16-bit colour pixels and resistive touch overlay make this display a valuable addition to any Raspberry Pi project, where it can be used as a console, X window port, displaying images or video etc.
A custom kernel package based on Notro"s awesome framebuffer work has been created which can be installed over existing Raspbian (or derivative) images using just a few commands. Adafruit provide a free tutorial and software installation guide to help you get the most out of your new, touchable TFT screen.
The Adafruit 1.3" Color TFT Bonnet for Raspberry Pi has 240x240 color pixels in an IPS TFT display controlled over SPI. This display is super small, only about 1.3" diagonal, but since it is an IPS display, it"s very readable with high contrast and visibility.
With the TFT display in the center, Adafruit had some space on either side so they added a 5-way joystick and two pushbuttons. Great for when you want to have a control interface for your project. Using the display is very easy, Adafruit have a kernel driver and Python library for the ST7789 chipset. You can set it up as a console output so you can have text and user interface through the Raspberry Pi OS or you draw images, text, whatever you like, using the Python imaging library. Adafruit also have Python code you can use to read the joystick and buttons.
The Adafruit Mini PiTFT - 135x240 Color TFT Add-on for Raspberry Pi is your little TFT pal, ready to snap onto any and all Raspberry Pi computers, to give you a little display. The Mini PiTFT comes with a full color 240x135 pixel IPS display with great visibility at all angles. The TFT uses only the SPI port so its very fast, and we leave plenty of pins remaining available for buttons, LEDs, sensors, etc. It"s also nice and compact so it will fit into any case. This display is super small, only about 1.14" diagonal, but since it is an IPS display, its very readable with high contrast and visibility.
This display for the Raspberry Pi features 2.4" with 320x240 16-bit color pixels and a resistive touch overlay. The HAT uses the high speed SPI interface on the Pi and can use the mini display as a console, X window port, displaying images or video etc. Best of all it plugs right in on top!
This design uses the hardware SPI pins (SCK, MOSI, MISO, CE0, CE1) as well as GPIO #25 and #24. All other GPIO are unused. Since we had a tiny bit of space, there"s 5 spots for optional slim tactile switches wired to five GPIOs, that you can use if you want to make a basic user interface. For example, you can use one as a power on/off button.
We have a right-angle 26-pin connector off to the side. You can connect a classic 26-pin Raspberry Pi GPIO cable in order to access the rest of the GPIO through a Cobbler, etc.
Each order ships with an assembled HAT with 2.4" TFT display with resistive touchscreen and a 2x20 female socket header. Some light soldering is required to attach the header but it is easy work for anyone with a soldering iron & solder.Alternatively, you can use a stacking type header instead if you"d like to plug a 2x20 GPIO cable on top