About Arduino LCD + Coinslot + SD Card + Pro mini

#include <SPI.h>
#include “SdFat.h”
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20, 4);
const uint8_t chipSelect = SS;
String b="";
int counter=0;
int usedcounter=0;
int wrtcounter=0;
int coincounter=0;
int coinwrtcounter=0;
int coinusedcounter=0;
String inString;
String b2="";
int counter2=0;
int usedcounter2=0;
int wrtcounter2=0;
String inString2;
int screensaver=0;
SdFat SD;
File myFile;
ArduinoOutStream cout(Serial);
int a =0;
int e = 6;
int r = 8;
int i = 7;
int o =0;
int o1=0;
int led1hr = 3;
int led1d = 4;
int buttoncounter=0;
#define error(s) SD.errorHalt(F(s))
void r1hr_get_code() {
char line[25];
int n;
SdFile rdfile(“code1hr.txt”, O_READ);
if (!rdfile.isOpen()) {
error(“error reading code1hr.txt file”);}
Serial.println(F(“Selecting Specific Voucher For 1hr”));
while ((n = rdfile.fgets(line, sizeof(line))) > 0) {
if (line[n - 1] == ‘\n’) {
counter++;
if (counter == usedcounter){
b=line;} }}
counter = 0;
Serial.println(b);
rdfile.close(); }
void r1hr_get_counter() {
char line[25];
int n;
Serial.println(F(“Getting Counter For 1hr”));
SdFile rdfile(“counter1hr.txt”, O_READ);
if (!rdfile.isOpen()) {
error(“error reading counter1hr.txt”);}
while ((n = rdfile.fgets(line, sizeof(line))) > 0) {
if (line[n - 1] == ‘\n’) {
usedcounter=0;
inString = line;
usedcounter = (inString.toInt());
} }
counter = 0;
rdfile.close(); }
void r1hr_write_counter(){
Serial.println(F(“Writing Counter For 1hr”));
myFile = SD.open(“counter1hr.txt”, FILE_WRITE);
if (myFile) {
wrtcounter = usedcounter+1;
myFile.println(wrtcounter);
myFile.close(); } }
void r3hr_get_code() {
char line[25];
int n;
SdFile rdfile(“code3hr.txt”, O_READ);
if (!rdfile.isOpen()) {
error(“error reading code3hr.txt file”);}
Serial.println(F(“Selecting Specific Voucher For 3hr”));
while ((n = rdfile.fgets(line, sizeof(line))) > 0) {
if (line[n - 1] == ‘\n’) {
counter++;
if (counter == usedcounter){
b=line; } }}
counter = 0;
Serial.println(b);
rdfile.close(); }
void r3hr_get_counter() {
char line[25];
int n;
Serial.println(F(“Getting Counter For 3hr”));
SdFile rdfile(“counter3hr.txt”, O_READ);
if (!rdfile.isOpen()) {
error(“error reading counter3hr.txt”); }
while ((n = rdfile.fgets(line, sizeof(line))) > 0) {
if (line[n - 1] == ‘\n’) {
usedcounter=0;
inString = line;
usedcounter = (inString.toInt()); } }
counter = 0;
Serial.println(usedcounter);
rdfile.close(); }
void r3hr_write_counter(){
Serial.println(F(“Writing Counter For 3hr”));
myFile = SD.open(“counter3hr.txt”, FILE_WRITE);
if (myFile) {
wrtcounter = usedcounter+1;
myFile.println(wrtcounter);
myFile.close();}
Serial.println(wrtcounter);}
void r12hr_get_code() {
char line[25];
int n;
SdFile rdfile(“code12hr.txt”, O_READ);
if (!rdfile.isOpen()) {
error(“error reading code1hr.txt file”); }
Serial.println(F(“Selecting Specific Voucher For 12hr”));
while ((n = rdfile.fgets(line, sizeof(line))) > 0) {
if (line[n - 1] == ‘\n’) {
counter++;
if (counter == usedcounter){
b=line; } } }
counter = 0;
Serial.println(b);
rdfile.close(); }
void r12hr_get_counter() {
char line[25];
int n;
Serial.println(F(“Getting Counter For 12hr”));
SdFile rdfile(“counter12hr.txt”, O_READ);
if (!rdfile.isOpen()) {
error(“error reading counter12hr.txt”); }
while ((n = rdfile.fgets(line, sizeof(line))) > 0) {
if (line[n - 1] == ‘\n’) {
usedcounter=0;
inString = line;
usedcounter = (inString.toInt()); } }
counter = 0;
Serial.println(usedcounter);
rdfile.close(); }
void r12hr_write_counter(){
Serial.println(F(“Writing Counter For 12hr”));
myFile = SD.open(“counter12hr.txt”, FILE_WRITE);
if (myFile) {
wrtcounter = usedcounter+1;
myFile.println(wrtcounter);
myFile.close();}
Serial.println(wrtcounter);}
void r1day_get_code() {
char line[25];
int n;
SdFile rdfile(“code1day.txt”, O_READ);
if (!rdfile.isOpen()) {
error(“error reading code1day.txt file”);}
Serial.println(F(“Selecting Specific Voucher For 1day”));
while ((n = rdfile.fgets(line, sizeof(line))) > 0) {
if (line[n - 1] == ‘\n’) {
counter++;
if (counter == usedcounter){
b=line;} }}
counter = 0;
Serial.println(b);
rdfile.close(); }
void r1day_get_counter() {
char line[25];
int n;
Serial.println(F(“Getting Counter For 1day”));
SdFile rdfile(“counter1day.txt”, O_READ);
if (!rdfile.isOpen()) {
error(“error reading counter1day.txt”); }
while ((n = rdfile.fgets(line, sizeof(line))) > 0) {
if (line[n - 1] == ‘\n’) {
usedcounter=0;
inString = line;
usedcounter = (inString.toInt()); } }
counter = 0;
Serial.println(usedcounter);
rdfile.close(); }
void r1day_write_counter(){
Serial.println(F(“Writing Counter For 1day”));
myFile = SD.open(“counter1day.txt”, FILE_WRITE);
if (myFile) {
wrtcounter = usedcounter+1;
myFile.println(wrtcounter);
myFile.close();}
Serial.println(wrtcounter);}
void coin_get_counter() {
char line[25];
int n;
Serial.println(F(“Getting Counter for insertedcoin.txt”));
SdFile rdfile(“insertedcoin.txt”, O_READ);
if (!rdfile.isOpen()) {
error(“error reading insertedcoin.txt”);}
while ((n = rdfile.fgets(line, sizeof(line))) > 0) {
if (line[n - 1] == ‘\n’) {
coinusedcounter=0;
inString = line;
coinusedcounter = (inString.toInt()); } }
coincounter = 0;
Serial.println(usedcounter);
rdfile.close(); }
void coin_write_counter(){
Serial.println(F(“Writing Counter For insertedcoin.txt”));
myFile = SD.open(“insertedcoin.txt”, FILE_WRITE);
if (myFile) {
coinwrtcounter = coinusedcounter+5;
Serial.println(F(“TOTAL COIN”));
Serial.println(coinwrtcounter);
myFile.println(coinwrtcounter);
myFile.close(); } }
void setup(void) {
Serial.begin(9600);
while (!Serial) {
SysCall::yield();}
if (!SD.begin(chipSelect, SD_SCK_MHZ(50))) {
SD.initErrorHalt();}
lcd.init();
lcd.backlight();
lcd.begin(20, 4);
lcd.setCursor(2,0);
lcd.print(F(“Test Wifi Hotspot”));
delay(5000);
lcd.setCursor(0, 2);
}}}}}

Guys anyone want to help my Project? About the PINOUT of this code. Thank you.