Hey guys, currently i am trying to make a really simple program that will increase a count by +1, display it in the serial monitor, and then stop the sequence but I ran into a problem. It just keeps looping my first "if" statement and ignoring the "else" part. I think I might be overlooking something very simple..
Here's the code
#include <SPI.h>
void setup()
{
Serial.begin(9600);
SPI.begin();
}
void loop()
{
int studentsSIGNEDIN=0;
int signedIN=1;
int notsignedIN=0;
{
if (notsignedIN != signedIN)
{
studentsSIGNEDIN++;
Serial.println("Student has been signed in");
Serial.print("Total number of students signed in right now is:");
Serial.println(studentsSIGNEDIN);
}
else
{
Serial.println("Student already signed in");
}
}
notsignedIN == signedIN;
delay(2000);
}
Here's a picture of the serial monitor: