I am new to embedded programming and don't consider myself a programmer, but have done some. In the embedded world, I have only used the Teensy 3.1 with Teenduino.
In effect, what I would like to do is to have a DIP switch connected to the Teensy to control its functionality. When the Teensy is powered on it will read the DIP switches, and depending upon the switch settings, have the Teensy perform different functions. In the ideal world, this would control which program of multiple programs loaded into the Teensy would be executed. However, my understanding is that this is not possible.
A potential method of doing this would be to have different blocks of code in the loop part of the program. The execution of these blocks could be controlled by if statements or possibly the switch statement with values from the DIP switch.
Are there more elegant ways of having different programs run or different functionality depending upon the DIP switch settings?
In effect, what I would like to do is to have a DIP switch connected to the Teensy to control its functionality. When the Teensy is powered on it will read the DIP switches, and depending upon the switch settings, have the Teensy perform different functions. In the ideal world, this would control which program of multiple programs loaded into the Teensy would be executed. However, my understanding is that this is not possible.
A potential method of doing this would be to have different blocks of code in the loop part of the program. The execution of these blocks could be controlled by if statements or possibly the switch statement with values from the DIP switch.
Are there more elegant ways of having different programs run or different functionality depending upon the DIP switch settings?