[ Log In ]
3 pin slide switch

SPDT Slide Switch 3 pin 30V

$1.49
Qty:
Tactile momentary push button switch 6 mm x 6 mm (through hole)
LED button tactile switch

LED Button Tactile Switch

$1.89
Qty:
Potentiometer with adjustable knob.

50K Potentiometer Panel Mount (Non Trimmer) With Knob

$2.45
Qty:
Tumbnail: 62 oz-in NEMA 17 Stepping motors (also called stepper motor)

NEMA 17 Stepping Motor (62 oz-in 5mm single shaft)

$19.95 Out of Stock
Qty:
Modular 2/5 amp stepping motor driver

2.5 Stepper Motor Driver (Modular unit)

$45.00
Qty:
3 Foot USB Cable Type A to USB Cable Type A

USB Cable Type A Male to USB Type A Male - 3 FT

$2.65
Qty:
USB 2.0 Cable 10 Foot Type A Male to Type B Male

USB 2.0 Cable Type A Male to Type B Male - 10 FT

$4.80
Qty:
Image of the Atmega324p

Atmega324P

$8.50
Qty:

Programming: The Switch and Case Conditional Statement Explained with Example

The switch statement is a conditional statement. The switch statement is like a menu, and case is like the menu option. The switch will have a variable and each case statement will have a value that this variable may be matched.
switch (Variable)
{
case FirstValue:
//Code to execute when FirstValue is matched
//...
break;
case SecondValue:
//Code to execute when SecondValue is matched
//...
break;
case ThirdValue:
//Code to execute when ThirdValueis matched
//...
break;
default:
//Default code
break;
}

Comments and Additional Information

Have some code to share? Or additional information? Respond here:

You need to be logged in to save a response on this page. The response must be constructive, helpful, supplimentary or to correct the existing video, code or narrative content.

Description:

Code (optional):