it's somehow frustrating that i encounter this problem twice but i still don't know what i did wrong to encounter or create this problem again...
like it's working a week a go (i can even change the codes as i was making the project) then suddenly you can't open the serial port of the arduino.
Is it possible that it just happen on its own because of a bad quality electronic components used for the board or etc.
Or is it normal (frequent) for Arduino clones to be like that?
I've been using clones and official boards with the ATmega16U2 for years without ever having this problem. I also suspect a "magic smoke" incident. It is possible that the firmware on the ATmega16U2 could be somehow corrupted, though I'm not sure how that would happen. That is less likely to happen to the purpose build USB to TTL serial adapter chips like the CH340, FT232, etc. You will find some information online about flashing the ATmega16U2 firmware but people always seem to have a lot of trouble doing that and I don't remember any where it actually ended up solving this sort of problem.
It's possible. Contrary to what you might expect, you need to make the connections RX-RX, TX-TX as the pins are marked on the silkscreen of the Uno and Mega. You won't have the auto reset so you need to press the reset button on the Mega at just the right time when the upload starts, but after compilation is finished. You should turn on verbose output during upload in File > Preferences to be able to see the progress of the upload. You also need to hold the ATmega328P on the Uno in reset so that it won't interfere with the communication with the Mega.
You could also use the Uno as an "Arduino as ISP" programmer to do a Sketch > Upload Using Programmer but then you won't also be able to use the Uno to do serial communication to Serial Monitor.
All that assumes that the ATmega2560 on the Mega is not damaged.
thanks pert.
i tried using my arduino uno with ch340 to upload sketches with my arduino mega using the arduino as isp method and the tx to rx method. i can't upload the sketch.
does it possibly mean that the atmega 2560 one is broken?
Another question:
example if the atmega 2560 is not working but the atmega16u2 is working, can i still see my arduino in my computer if i connected it?
i'm suspecting that using the xl6009 dc to dc step up converter damages the atmega 16u2 as i use it to power my arduino through the power jack...
i sometimes see that when the battery is getting too low the voltage output goes to 30-40 volts but when the battery was on its nominal voltage (3.7) and up the output of the boost converter stay on the voltage on which i set around (7-10 volts) .
it's true and it happened to me. But how could a low battery outputs a big voltage in a step up converter while the nominal voltage battery and up stays to what i set it on a certain voltage.
i'm fine with disposing these boards but atleast i just want to know what lead me to these so i won't accidentally do it again. and i'll be fine with that.
But unfortunately i still don't know the errors or things ive done to led me to these hoping someone can guide me.