so the project uses a keypad where if you type a certain number code (in this case 4357) you click on the button, and the particle photon sends a message that you Need Help. However, I keep getting an error and I don't know why.
#include <Keypad.h>
const byte ROWS = 4; //four rows
const byte COLS = 4; //four columns
//defining symbol on the buttons of keypad
char hexaKeys[ROWS][COLS] = {
{ '1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte rowPins[ROWS] = {9, 8, 7, 6};
byte colPins[COLS] = {5, 4, 3, 2)' //connection to the column pinouts of keypad
//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad ( makeupKeymap (hexaKeys), rowPins, colPins, ROWS, COLS);
int count=0;
String code="";
String help= "4357";
const int rbutton = 8;
const int gLED = 9;
void setup() {
pinMode(0, INPUT);
pinMode(7, OUTPUT);
Serial.begin(9600);
}
void loop()
{
char customKey = customKeypad.getKey();
if(customKey){
count=count+1;
if(cout==5)
{count=0; code"";}
code=code+String(customKey);
Serial.Publish(code);
}
if(code==help)
{
Particle.publish ("Needhelp");
delay(1000);
}
else
{
Particle.publish("Needhelp");
}
};