Need a discount on popular programming courses? Find them here. View offers

An Introduction to Programming the Internet of Things (IoT) Specialization (

Visit Tutorial
Paid Video Beginner
#5 out of total 22 Arduino Tutorials and Courses 7k+ views



Ian Harris
110 points

Why programmers like this tutorial?

Content quality

Qualified Instructor

Video quality

Course Pace

Course depth and Coverage

Write your review of this tutorial:

You can also ask questions or provide any information that might be helpful to the people taking this course.

Ayesha Salman
Ayesha Salman 10 points
3 years ago

I'm getting this problem with arduino switch please help!

I believe the arduino that I got from as i think it's SWITCH statement has some compile time problems.

If I try to declare a boolean variable in a CASE statement as illustrated in "case 2: in the snippet below, the compiler throws an error.

I add this to the other CASE statement problem I flagged earlier: ie. the compiler does not throw an error if you misspell "default" as "defalut.")


switch (var) {
case 1:
//do something when var equals 1
case 2:
boolean X;
//do something when var equals 2
// if nothing else matches, do the default
// default is optional

This appears to be a problem with the compiler, NOT my code, and it seems to happen only with nested SWITCH statements.

Thank in advance for your prompt response.