- 1

What is wrong with my code? It’s not working like its ment to

// C++ code // const int LED =13; const int BUTTON = 7; int val = 0; void setup() { pinMode(LED,OUTPUT); pinMode(BUTTON,INPUT); } void loop() { val = digitalRead(BUTTON); if(val = HIGH){ digitalWrite(LED,HIGH); }else{ digitalWrite(LED,LOW); } {

27th Oct 2021, 11:40 PM
Nghia にあ
Nghia にあ - avatar
1 Respuesta
+ 3
Please avoid reposting a question to help the community reduce duplicate questions 👍 https://www.sololearn.com/Discuss/2912910/?ref=app
28th Oct 2021, 1:01 AM
Ipang