reference:
reference:
http://www.lcdwiki.com/MHS-4.0inch_Display-B
- Resolution 480*320 (Pixel)
- Touch Screen Controller XPT2046
- LCD Driver IC ST7796S
reference: https://simple-circuit.com/arduino-st7789-ips-tft-display-example/
- RST pin is connected to Arduino digital pin 8,
- DC pin is connected to Arduino digital pin 9,
- SDA pin is connected to Arduino digital pin 11,
- SCL pin is connected to Arduino digital pin 13.
reference:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "SevSeg.h" | |
SevSeg sevseg; //Initiate a seven segment controller object | |
// constants won't change. They're used here to set pin numbers: | |
const int SENSOR_PIN = A4; // the Arduino's input pin that connects to the sensor's SIGNAL pin | |
const int LED_PIN = A5; | |
const int FAN_PIN = A0; | |
const int VOLTAGE_PIN = A2; | |
const int BUTTON_PIN = 1; | |
#define MQ2pin (A1) |