All Projects → nopnop2002 → Raspberry-ili9340spi

nopnop2002 / Raspberry-ili9340spi

Licence: MIT license
ILI9340 SPI TFT Library & XPT2046 Touch Screen Library for Raspberry

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Raspberry-ili9340spi

Raspberry-ili9325
Parallel TFT Shield Library for wiringPi
Stars: ✭ 40 (+53.85%)
Mutual labels:  raspberrypi, ili9341, xpt2046
wiringpi-tft-tool
TFT Command Line Tool for Raspberry Pi
Stars: ✭ 35 (+34.62%)
Mutual labels:  raspberrypi, ili9341, st7735
NR1-UI
Userinterface for Volumio (RaspberryPi) with ssd1322 and ssd1306 oled display, spectrum bargraph, progress bar, LED functions, Standby-functions, 4 Buttons and Rotary Encoder.
Stars: ✭ 29 (+11.54%)
Mutual labels:  raspberrypi, st7735
neato-serial
Python serial interface for Neato robot vacuum cleaners. Testing on XV Signature Pro, should work on others.
Stars: ✭ 39 (+50%)
Mutual labels:  raspberrypi
Bazel bin
Bazel's pre-built binaries for armv7l / aarch64 / x86_64.
Stars: ✭ 23 (-11.54%)
Mutual labels:  raspberrypi
yamete
Yamete - Hentai downloader in PHP CLI - Easy site downloader PHP system
Stars: ✭ 63 (+142.31%)
Mutual labels:  raspberrypi
xbvr
Tool to organize and stream your VR porn library
Stars: ✭ 186 (+615.38%)
Mutual labels:  raspberrypi
darknet-nnpack
Darknet with NNPACK
Stars: ✭ 302 (+1061.54%)
Mutual labels:  raspberrypi
pimox
Proxmox for the Raspberry Pi
Stars: ✭ 59 (+126.92%)
Mutual labels:  raspberrypi
Pi-Pool
Cardano Stakepool on Raspberry Pi
Stars: ✭ 204 (+684.62%)
Mutual labels:  raspberrypi
PiHueEntertainment
An application that can handle the Hue Entertainment Areas on a Raspberry Pi
Stars: ✭ 28 (+7.69%)
Mutual labels:  raspberrypi
esp32 ST7735 Movie
Movie Player on esp32 and ST7735
Stars: ✭ 38 (+46.15%)
Mutual labels:  st7735
raspberry-noaa
Fully automated ISS SSTV, NOAA and Meteor satellite image downloader using Raspberry PI
Stars: ✭ 155 (+496.15%)
Mutual labels:  raspberrypi
ControlBlockService2
This is the driver for the ControlBlock re.v 2.X, a power switch and input/output/gameapd gadget for the Raspberry Pi
Stars: ✭ 18 (-30.77%)
Mutual labels:  raspberrypi
MPU-9250-Sensors-Data-Collect
MPU9250 (MPU6500 + AK8963) I2C Driver in Python for Raspbery PI
Stars: ✭ 51 (+96.15%)
Mutual labels:  raspberrypi
fresh-coffee-listener
Using a raspberry pi, we listen to the coffee machine and count the number of coffee consumption
Stars: ✭ 52 (+100%)
Mutual labels:  raspberrypi
filebrowser-docker
🐳 filebrowser inside Docker container
Stars: ✭ 122 (+369.23%)
Mutual labels:  raspberrypi
OpenCV Raspberry pi TBB
Latest pre-compiled binary of Pre-released & Stable OpenCV (4.0.0) along with TBB (2018-Update 6) for Raspberry Pi.
Stars: ✭ 46 (+76.92%)
Mutual labels:  raspberrypi
TPU-Posenet
Edge TPU Accelerator / Multi-TPU / Multi-Model + Posenet/DeeplabV3/MobileNet-SSD + Python + Sync / Async + LaptopPC / RaspberryPi
Stars: ✭ 39 (+50%)
Mutual labels:  raspberrypi
eliot-os
Minimal Operating System for Eliot
Stars: ✭ 19 (-26.92%)
Mutual labels:  raspberrypi

Raspberry-ili9340spi

ILI9340 SPI TFT Library for Raspberry Pi.
This may works with other boards like OrangePi/NanoPi.

You can show a chart to ILI9340/ILI9341/ILI9163C/ST7735 SPI TFT.
You can choose bmc2835 library/WiringPi library.

I tested these TFT.
1.44 inch 128x128 ST7735
1.44 inch 128x128 ILI9163C
1.8 inch 128x160 ST7735
2.2 inch 240x320 ILI9340
2.4 inch 240x320 ILI9341
2.4 inch 240x320 ILI9341


Wirering

TFT Rpi/Opi
VCC -- 3.3V
GND -- GND
CS -- Pin#24(SPI CS0)
RES -- Pin#5(*)
D/C -- Pin#3(*)
MOSI -- Pin#19(SPI MOSI)
SCK -- Pin#23(SPI SCLK)
LED -- 3.3V
MISO -- N/C

(*) You can change any pin.

#define D_C  2  // GPIO2=Pin#3
#define RES  3  // GPIO3=Pin#5

Build using bcm2835 library

RPi Only, Very fast

wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.56.tar.gz
tar zxvf bcm2835-1.56.tar.gz
cd bcm2835-1.56
./configure
make
sudo make check
sudo make install

* This tool require 1.56 or later.
* Because this tool uses bcm2835_spi_write.

cd $HOME   
git clone https://github.com/nopnop2002/Raspberry-ili9340spi
cd Raspberry-ili9340spi
cc -o demo demo.c fontx.c ili9340.c -lbcm2835 -lm -DBCM

Build using WiringPi library

This project uses the wiringPiSetupGpio() function to initialize GPIOs.
Then use the wiringPiSPISetup() function to initialize the SPI.
If you use it on a board other than the RPI board, you may need to change the GPIO number.

#define D_C  2  // GPIO2=Pin#3
#define RES  3  // GPIO3=Pin#5
#define C_S  8  // GPIO8=Pin#24

As far as I know, there are these libraries.

  • WiringPi for OrangePi
  • WiringPi for BananaPi
  • WiringPi for NanoPi
  • WiringPi for Pine-64
git clone https://github.com/nopnop2002/Raspberry-ili9340spi
cd Raspberry-ili9340spi
cc -o demo demo.c fontx.c ili9340.c -lwiringPi -lm -DWPI

Note:
Opi have only 1 SPI.
OPi-PC have CE0 and GPIO8.
OPi ZERO have CE1 and GPIO8.


TFT resolution and GRAM offset

TFT resolution is set to tft.conf.

If your TFT doesn't use a memory from 0th address in GRAM, It use GRAM offset which set to tft.conf.


ili9340-11 ili9340-12 ili9340-13 ili9340-14 ili9340-15 ili9340-16 ili9340-17 ili9340-18 ili9340-19 ili9340-20 ili9340-21


This library can use ILI9341 TFT.

From left 2.8" ILI9341,2.4" ILI9341, 2.2" ILI9340.

ili9341-a

ili9341-b

ili9341-c


This library can use ILI9163C/ST7735 TFT.

From left to right.
2.2 inch 240x320 ILI9340
1.44 inch 128x128 ST7735
1.44 inch 128x128 ILI9163C
1.8 inch 128x160 ST7735

ili9163-1


XPT2046 Touch Screen

There is a TFT equipped with XPT2046.
XPT2046-3

A library of XPT2046 Touch Screen is included in this library.
I ported from here.

There is a TFT equipped with HR2046.
XPT2046 and HR2046 are very similar. But HR2046 does not work properly.
XPT2046-2

Wirering

TFT Rpi
T_IRQ -- Pin#22 (*1)
T_OUT -- Pin#21(SPI MISO) (*2)
T_DIN -- Pin#19(SPI MOSI) (*2)
T_CS -- Pin#26(SPI CE1)
T_CLK -- Pin#23(SPI SCLK) (*2)
MISO -- N/C
LED -- 3.3V
SCK -- Pin#23(SPI SCLK) (*2)
MOSI -- Pin#19(SPI MOSI) (*2)
D/C -- Pin#3 (*1)
RES -- Pin#5 (*1)
CS -- Pin#24(SPI CS0)
GND -- GND
VCC -- 3.3V

(*1) You can change any pin.

(*2) SPI is shared by TFT and XPT2046.


cc -o xpt xpt.c xpt2046.c -lbcm2835   
sudo ./xpt

If you touch screen, point will show.

touch-11


cc -o touch touch.c fontx.c ili9340.c xpt2046.c -lbcm2835 -lm -DBCM
sudo ./touch

If you touch area, number will show.

touch-12

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].