Back to Arduino Step By Step Course

Lesson 08: Arduino Conditional Statements

دروس آردوینو به فارسی

Please select other codes for this lecture from the links below.

Code 1 Lecture 8

In this lecture we learn about Conditional Statement such as if, else if and else with multiple examples.

 * S01-08 
 * Contional Statement 1
   Please watch video instruction here
 This code is available at
with over 100 lectures Free On  YouTube Watch it here
Get the code for the course: 
 * Written by Ahmad Shamshiri for Robojax,

 * at 22:27 on Feb 07, 2019 in Ajax, Ontario, Canada
int mark = 56;
char grade;

void setup() {
  if(mark>=90 && mark<=100){
    grade ='A';
  }else if(mark>=80 && mark<=89){
    grade ='B';
  }else if(mark>=70 && mark<=79){
    grade ='C';
  }else if(mark>=60 && mark<=69){
    grade ='D';
    grade ='F';

  Serial.begin(9600);//initialize the serial monitor
  Serial.print("Grade is:");


void loop() {
  	//Robojax Step By Step Arduino Course



The least I expect from you is to thumb up the video and subscribe to my channel. I appriciate that. .I have spent months making these lectures and writing code. You don't lose anything by subscribging to my channel. Your subscription is stamp of approval to my videos and more people can find them and in it turn it helps me. Thank you

If you found this tutorial helpful, please support me so I can continue creating content like this. support me via PayPal

**** AFFILIATE PROGRAM **** We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to and affiliated sites.