Reset Arduino uno by programmatically

Hello I can not verify code because the way your code is written
Serial. print ? n("How to Reset Arduino Programmatically "); my computer can not read the way you type printin is the question mark i a capital it looks like a capital 1 number how do you type this so the computer understands

Serial.println() - Arduino Reference

Hello @seebie, you topic was moved to a more appropriate section of the forum.

The ? is a lower case 'L'; to make it easier to remember, println basically stands for print line.

Hello I have again changed to a lower case L ie "l" but it is the same Serial.println("How to Reset Arduino Programmatically"); it highlights the second line in void loop it says exit status1 'class HardwareSerial' has no member named 'println'; did you mean 'println'? what is wrong please kind regards seebie

Please post your code.

const int OUTPUT_PIN = 2;

void setup() {
digitalWrite( OUTPUT_PIN, HIGH);
pinMode(OUTPUT_PIN, OUTPUT);
Serial.begin(9600);
Serial.println("How to Reset Arduino Programmatically");
}
void loop()
{
Serial.println("Arduino will be reset after 5 seconds");
delay(5000);
digitalWrite(OUTPUT_PIN, LOW);
Serial.println("Arduino never run to this line");
}

Without the use of code tags the format of your code is not correct.
This indeed compiles

const int OUTPUT_PIN = 2;

void setup() {
digitalWrite( OUTPUT_PIN, HIGH);
pinMode(OUTPUT_PIN, OUTPUT);
Serial.begin(9600);
Serial.println("How to Reset Arduino Programmatically");
}
void loop()
{
Serial.println("Arduino will be reset after 5 seconds");
delay(5000);
digitalWrite(OUTPUT_PIN, LOW);
Serial.println("Arduino never run to this line");
}

Hi Cattledog Please can you explain what code tags are ? I found this code on Arduino Starter Forum
so i assumed it would work,it did not say you had to add anything for it to work.
I find this so much with Arduino nothing is black & white they assume you know if you don't you lost???
Kind regards seebie

Code tags are something for the forum, not for your code in the IDE.

The easy way to it is to copy your code in the ide using edit -> copy for forum and next paste it in a reply.

When you do that, it's easier for others to study online and copy.

Also, before the copying, use tools -> auto format so your code is properly indented; it will even reveal certain errors if you know what to look for.

Please explain the conditions where the code in your reply #6 did not compile.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.