Hi,
A Digital MultiMeter.
Try this code, it will read the button pin and make the on board LED turn ON when you press it.
Also if you open the IDE Monitor window and select 9600 baud it will tell you the button status.
int switchPin = 7;
int LEDPin = 13;
bool switchStatus;
void setup()
{
Serial.begin(9600);
pinMode(switchPin, INPUT);
pinMode(LEDPin, OUTPUT);
}
void loop()
{
switchStatus = digitalRead(switchPin);
if (switchStatus == true)
{
Serial.println("Button Pressed");
digitalWrite(LEDPin, HIGH);
}
else
{
Serial.println("Button NOT Pressed");
digitalWrite(LEDPin, LOW);
}
delay (250);
}
Have you moved the orange lead as shown in my previous post?
Did you write this code all at once or in stages.
If in stages you should have a similar code to test your button, and other codes to test each of your hardware items, before combining them.
Tom...
![]()
PS, We need a circuit diagram, please draw one and post an image, include component names and pin labels.