Arduino nano is not working properly

i just want to update that actually ,the problem is when i use arduino nano , the Serial will not be working properly and give out those unreadable character as shown in the picture


but when i use arduino uno it works fine , so i just dont know how to fix this .

This does not seem to be a problem with your code. Do you have a resistor in series with the LED on pin 6?

What happens if you leave the pinMode and digitalWrite statements out? Do you get proper data?

Please don't post screenshots of code. Nobody will type it in from a screenshot to evaluate. Copy your code and paste it here using so-called code-tags.

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advise on) your project :wink: See About the Installation & Troubleshooting category.

Nano CH340?

Or, even better: please post a schematic of your setup and if possible a good photo of it as well.

If you expect to see the LED blink, put a second delay at the bottom of loop().

Please remember to use code tags when posting code

@hiep56564564

One Blink of LED (connected at DPin-6) consists of the following four events:

turn on LED
wait for while 
turn off LED
wait for a while

If the LED is expected to blink continuously, the above text codes are to be conveted into Arduino codes and then put in the loop() function like below:

void loop()
{
     digitalWrite(pin, HIGH);
     delay(2000);
     digitalWrite(pin, LOW);
     delay(2000);
}

actually i have played with arduino uno before and it worked fine , i just bought a new arduino nano and tested it out but it does not seem to read the code

yes i have resistor , but actually i have played with arduino uno before and it worked fine , i just bought a new arduino nano and tested it out but it does not seem to read the code.

yeah , it is the one i bought

post#3 links to an instructables page for the Nano CH340, which has a link to the required serial drivers.

1 Like

In your picture I see no evidence of your sketch being uploaded. Did you actually click the "->" (arrow right) icon and not just the "V" (check mark) icon at the top left?
What do you get on the Serial Monitor if you set it to 115200 baud and press Reset on the Nano?

1 Like

so actually the problem is my serial just give outs these character when i use the arduino mentioned above , when i use arduino uno again it works just fine . so i dont know what causes this


so actually the problem is my serial just give outs these character when i use the arduino mentioned above , when i use arduino uno again it works just fine . so i dont know what causes this

so actually the problem is my serial just give outs these character when i use the arduino mentioned above , when i use arduino uno again it works just fine . so i dont know what causes this

Have you maybe got a 3.3V Nano that can only run at 8MHz, but has been told it is a 16MHz?
That could explain the line speed mismatch.

1 Like

i find the problem is that my arduino nano can't work well with serial . And you can see my update on this , but i tried to change baud rate and set it like this , serial print my "hello world" but it is not working with my potentialmeter , and gives out random numbers as below


but you should know that i try this with arduino uno , everything works fine, but only the problems come up when i use arduino nano . im kinda at loss now

i

Yeah, it's starting to look like something like this.

2400bps = 1/4 of 9600bps, so effectively this Nano seems to be running at 4MHz.

@hiep56564564 can you please post a good/detailed photograph of your Nano, particularly the chip in the middle of the top side and the shiny crystal next to it? The letters on both should be readable.

Make sure you're not using a USB charging cable (no data). In any case, try using a different Mini-B USB cable.

He's getting data on the console. The cable is not the problem.

OK, so its the proper type of USB cable, but it still could be low quality and/or defective.