Hi,
sind some weeks, I start doing a lot of stuff with arduino.
Today, I wanted to start my new project with a Arduino Mega2560. And now the trouble begun.
First I thought I would be stupid, I was not able to make a sketch, that prints in serial, just if a switch was toggled or not.
Later, doing stuff with LED, I saw, that nowthing works normal.
My digital pins read total nonsense. influenced from whatever.... I have noe clue.
It also happens, that they read nonsense, when there is not even a cable plugged in.
I've updateded a video:
The best thing: I also have a Arduino UNO, and it behavers exactly the same!
What I've tested so far:
- changed all cables (but as you see, the pins also change state without need of a cable)
- changed the button (using the BASIC example for button and LED, this gets even stranger - YouTube)
- change source of electricity. (USB 2 different ports, one powerbank and a power adapter.
- also without breadboard, and another breadboard.
- tested different sketches. With LED, without LED, also with builtin LED.
- Output always seems to work correct. but as soon as a pin has input mode...
Hope someone has an idea what I could try next.