Hello, i have a problem with the newest stock version (2.3.6, which is released meaning that it completely is finished and works fine ... right?) of the ardurino IDE engine not working properly (the copy is from the official site and no i do not have a virus). i have a problem where sometimes, it ignores commands, doesnt run "if" functions properly, and i have tested it with a joY-it MEGA 2560 board and a fundino UNO board, the fundino uno being from my school, meaning that the boards are not the problem aswell as the code. (one of the cables is having a loose contact, a transistor is not discharging as quick as it should and there is a bit of yank but that is also not the problem as i have proven with various tests.
i have a stick board with a ground line on the minus rails on both sides on the 2 ground pins, i have a LED connected to Pin 2 and the other end directly to the minus pins, And a click button thingy connected with one end directly to plus (via a rail, but the rail is just used for that) and the other end to PIN 3 and a transistor (english not my main language but ignore that) that is connected to the other minus rail (the LED and the button are not on the same minus rail and connector)
I have tested both 3.3v and 5v for the button and then with both boards come to the conclusion that something aint right.
Yesterday, i had the issue that it said the number "534" as a result of a digital read command even with a full reset. (on the Mega 2560). And there was only the button and nothing else there. Also, the if commands werent working and the variable did not change, also, it did not accept serial commands. And so i thought the board was f-ed.
Today, i try the same thing again, with both boards. besides the hardware issues, the LED should be capable of turning off, when the read number is 0. And when it is 0 (its printed in serial), the LED stays on, allways. When i change the if function to something impossible, it STILL makes the led flash a little. then i wanted to test if that is the issue and it started to ignore the delay command in the middle (why??). The flashing is not there when i remove the if functions or the digital write ones (odd). And for some reason, both boards stopped writing "534" when i started the same code on the board (i did not restart the pc because the pc in question is not supposed to, its a laptop but repurposed) and it stopped posting that. I have absolutely no idea why.
int LED1=2;
int IOpinone=3;
int Taster1=0;
void setup() {
Serial.begin(9600);
pinMode(LED1, OUTPUT);
pinMode(IOpinone, INPUT);
}
void loop() {
Taster1=digitalRead(IOpinone);
Serial.println(Taster1);
if(Taster1=1){
digitalWrite(LED1, HIGH);
}
delay(50);
if (Taster1=0){
digitalWrite(LED1, LOW);
}
delay(50);
}
also, i have a very stressed time rn so do not spam this with what hardware issues could be or that they are responsible because that doesnt make if functions not work. the same build with the same code was run on a school pc with the exact same version and the exact same IDEand there it worked. A PC issue is very unlikely, this PC is very reliable, unlike the battery it came with (boom boom).
Also i saw a lot of people in forums like this bugging about grammar, if that is what you are planning here better go annoying someone else (that is a vague threat, i am very tired of stuff like this)