Waveshare 3.5 inch Resistive Screen IPS LCD Screen for Raspberry Pi 3
Waveshare 3.5 inch Resistive Screen IPS LCD Screen for Raspberry Pi 3
The Waveshare 3.5 inch Resistive Screen IPS LCD Screen is a high-quality display module specifically designed for the Raspberry Pi 3 single-board computer. This compact and lightweight display module integrates a resistive touchscreen and a high-brightness IPS LCD panel, providing an excellent visual experience for various IoT and robotics applications.
The Waveshare 3.5 inch Resistive Screen IPS LCD Screen functions as a primary display device for the Raspberry Pi 3, enabling users to interact with their projects using a responsive and intuitive touchscreen interface. The display module receives video and touchscreen data from the Raspberry Pi 3 through a 4-wire SPI interface and a 5-pin FPC connector, respectively.
3.5 inches
IPS (In-Plane Switching) LCD
480x320 pixels
| 4 | 3 |
250 cd/m
80/80/80/80 (Up/Down/Left/Right)
Resistive
1024x1024
5-pin FPC connector
4-wire SPI
15-pin GPIO connector for Raspberry Pi 3
5V
2.5W (typical)
-20C to 60C
56.5mm x 86.5mm x 12.5mm
Approx. 60g
Supports Raspberry Pi 3B and 3B+ models
Compatible with Raspbian and other Linux-based operating systems
Includes a supporting bracket for easy mounting and installation
ST7789VW
XPT2054-U
Internal DC-DC converter
CE, FCC, and RoHS certified
Detailed datasheet and user manual available on the manufacturer's website
Includes supporting libraries and example code for Raspberry Pi 3
The Waveshare 3.5 inch Resistive Screen IPS LCD Screen for Raspberry Pi 3 is an ideal solution for IoT and robotics projects that require a compact, high-quality display with touchscreen capabilities. Its compatibility with the Raspberry Pi 3 and support for various Linux-based operating systems make it an excellent choice for developers and makers.
Waveshare 3.5 inch Resistive Screen IPS LCD for Raspberry Pi 3OverviewThe Waveshare 3.5 inch Resistive Screen IPS LCD is a compact and high-resolution display designed specifically for the Raspberry Pi 3. This LCD screen features a resistive touchscreen, allowing users to interact with their Raspberry Pi projects in a intuitive and user-friendly manner. With a resolution of 480x320 pixels and a 3.5-inch diagonal size, this display is perfect for a wide range of applications, from DIY projects to industrial control systems.Technical SpecificationsDisplay Size: 3.5 inch
Resolution: 480x320 pixels
Touch Type: Resistive
Interface: SPI
Power Supply: 5V
Operating Temperature: -20C to 70CGetting StartedTo get started with the Waveshare 3.5 inch Resistive Screen IPS LCD, you'll need to:1. Connect the display to your Raspberry Pi 3 using the SPI interface.
2. Install the necessary drivers and libraries on your Raspberry Pi.
3. Configure the display settings using the provided scripts and configuration files.Code Examples### Example 1: Displaying an Image using PythonIn this example, we'll demonstrate how to display an image on the Waveshare 3.5 inch Resistive Screen IPS LCD using Python.Hardware RequirementsRaspberry Pi 3
Waveshare 3.5 inch Resistive Screen IPS LCD
Breadboard and jumper wiresSoftware RequirementsRaspbian OS
Python 3.x
Pygame libraryCode
```python
import pygame
import pygame.freetype# Initialize pygame
pygame.init()# Set up the display
screen = pygame.display.set_mode((480, 320))# Load an image
image = pygame.image.load("image.png")# Display the image
screen.blit(image, (0, 0))
pygame.display.flip()# Run indefinitely until the user exits
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
```
Example 2: Creating a GUI using TkinterIn this example, we'll demonstrate how to create a simple GUI using Tkinter on the Waveshare 3.5 inch Resistive Screen IPS LCD.Hardware RequirementsRaspberry Pi 3
Waveshare 3.5 inch Resistive Screen IPS LCD
Breadboard and jumper wiresSoftware RequirementsRaspbian OS
Python 3.x
Tkinter libraryCode
```python
import tkinter as tk# Create a Tkinter window
window = tk.Tk()
window.title("Waveshare 3.5 inch Resistive Screen IPS LCD")# Set up the display
window.geometry("480x320")# Create a label
label = tk.Label(window, text="Hello, World!")
label.pack()# Create a button
button = tk.Button(window, text="Click me!")
button.pack()# Run the GUI event loop
window.mainloop()
```
Example 3: Reading Touchscreen Input using CIn this example, we'll demonstrate how to read touchscreen input using C on the Waveshare 3.5 inch Resistive Screen IPS LCD.Hardware RequirementsRaspberry Pi 3
Waveshare 3.5 inch Resistive Screen IPS LCD
Breadboard and jumper wiresSoftware RequirementsRaspbian OS
GCC compiler
WiringPi libraryCode
```c
#include <wiringPi.h>
#include <wiringPiSPI.h>#define TS_CS 5 // Touchscreen chip select pin
#define TS_CLK 6 // Touchscreen clock pin
#define TS_DIN 7 // Touchscreen data in pin
#define TS_DOUT 8 // Touchscreen data out pin
#define TS_IRQ 9 // Touchscreen interrupt pinint main() {
wiringPiSetup();// Initialize the touchscreen
pinMode(TS_CS, OUTPUT);
pinMode(TS_CLK, OUTPUT);
pinMode(TS_DIN, OUTPUT);
pinMode(TS_DOUT, INPUT);
pinMode(TS_IRQ, INPUT);while (1) {
// Read touchscreen data
uint16_t x, y;
readTouchscreenData(&x, &y);// Print the touchscreen coordinates
printf("Touchscreen coordinates: (%d, %d)
", x, y);delay(50);
}return 0;
}void readTouchscreenData(uint16_t x, uint16_t y) {
// Send the read command to the touchscreen
digitalWrite(TS_CS, LOW);
digitalWrite(TS_CLK, LOW);
digitalWrite(TS_DIN, LOW);// Read the touchscreen data
x = readTouchscreenByte();
y = readTouchscreenByte();digitalWrite(TS_CS, HIGH);
}uint16_t readTouchscreenByte() {
uint16_t data = 0;for (int i = 0; i < 16; i++) {
digitalWrite(TS_CLK, HIGH);
data |= (digitalRead(TS_DOUT) << i);
digitalWrite(TS_CLK, LOW);
}return data;
}
```
These code examples demonstrate the basic usage of the Waveshare 3.5 inch Resistive Screen IPS LCD with the Raspberry Pi 3. You can use these examples as a starting point for your own projects, or modify them to suit your specific needs.