Part 13 of the Arduino programming course – the switch and break statements.
Learn to write your own sketches for the Arduino in this multi-part course. No previous programming experience is needed.
The Arduino programming course consists of the following parts:
- Introduction and requirements
- Part 1: Arduino Sketch Structure and Flow
- Part 2: Arduino Sketch Main Loop and Calling Functions
- Part 3: Variables
- Part 4: Arithmetic Operators
- Part 5: Relational Operators
- Part 6: Increment Operator and Commenting
- Part 7: The Arduino for Loop
- Part 8: The Arduino while and do while Loops
- Part 9: The Arduino if Statement
- Part 10: Making Decisions with if-else
- Part 11: Decisions with if-else-if
- Part 12: Logical Operators
- Part 13: Switch and Break Statements
- Part 14: Conditional Operators
- Part 15: Functions
Each new part of the course will be added to his blog post as it becomes available.
You may find the Arduino Language Reference on the Arduino website helpful during the course.
This four channel Arduino software voltmeter with history was made by using an Arduino Uno and an application written in the Processing language that runs on a computer.
The Arduino reads analog values on four analog input pins connected through voltage dividers and then calculates the voltage. The Processing application displays the voltage reading and the voltage history is displayed on a graph for each channel.
This image shows the software voltmeter application:
Click the above link for the circuit diagram, Processing source code and Arduino source code for this project.
In this tutorial, a STM32 Value Line Discovery board is programmed using a ST-LINK/V2 in SWD (Serial Wire Debug) mode. Only four wires need to be connected between the ST-LINK/V2 programmer/debugger and a STM32F100 microcontroller in order to load a program to it when using SWD.
Find out how to program STM32 microcontroller evaluation boards using the built-in ST-LINK in Linux. The tutorial uses the STM32 Value Line Discovery board from ST Microelectronics and Ubuntu Linux.