Version 2 IDE

If you are using the new version 2 IDE then please refer to the page with notes on the new software.

The changes from version 1 are generally small and very positive but please read the notes as there is a potential bug that is best avoided at this early stage in learning C on an Arduino.

Page 1

Serial.begin(115200); Serial.println("Hello World");

Page 2

Hello World IDE

Page 4

void setup() {     // put your setup code here, to run once:     Serial.begin(115200);     Serial.println("Type me a number"); } void loop() {     // put your main code here, to run repeatedly:     char nChar = 0;     if (Serial.available() > 0) {         nChar = Serial.read();         if(isDigit(nChar)){             Serial.print("Number received: ");             Serial.println(nChar);             Serial.print("In binary: ");             Serial.println(nChar - 48, BIN);             Serial.println("Send me another");         } else {             Serial.println("Did not look like a number");         }     } }

Page 6

void loop() {     // put your main code here, to run repeatedly:     char nChar = 0;     if (Serial.available() > 0) {         nChar = Serial.read();         //if(isDigit(nChar)){             Serial.print("Number received: ");             Serial.println(nChar);             Serial.print("In binary: ");             Serial.println(nChar - 48, BIN);             Serial.println("Send me another");      // } else {      //     Serial.println("Did not look like a number");         //}     } }