R
R
RedSun-ops2020-08-26 15:48:29
Arduino
RedSun-ops, 2020-08-26 15:48:29

What to do if arduino gives out some kind of krakozyabry?

here is the code

void setup()
{
  pinMode(A4, INPUT);
  Serial.begin(9600);

}

void loop()
{
  Serial.println(analogRead(A4));
}

5f465d55c4201512779582.png
the photoresistor is powered by a 3.3 volt pin
and the serial port gives out some kind of bugs (⸮x⸮x⸮⸮x)
What should I do?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
K
Konstantin Zaitsev, 2020-08-26
@KonstantineZ

The port speed specified in the line Serial.begin(9600); must be the same as selected in the arduino IDE terminal

L
lonelymyp, 2020-08-26
@lonelymyp

First, fill in the standard example from the manual, it should work for sure.
https://www.arduino.cc/en/Tutorial/AnalogReadSerial

V
VT100, 2020-08-27
@VT100

Perhaps the wrong quartz is worth

Or set to "0" FUSE-bit CKDIV8.
Try 1200 baud.

A
AiR_WiZArD, 2020-08-30
@AiR_WiZArD

The problem is clearly in the wrong port speed. Try installing termite (or any other terminal software with baud rate settings) and set the baud rate to 4800, 5760, 720, 1200. One of them should work. For the test, it is better to output the string ala "test123"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question