Home / Tag Archives: switch

Tag Archives: switch

Using Ternary Operator in Arduino

Nested ternary example circuit

If your Arduino code involves decision making, then it’s very likely you’re using conditional statements. Using if … else… is common;  switch statements can be used as well. But there is a third way, using ternary operator, that will really make your code shorter. Example Scenario Say we are reading …

Read More »