Chapter 5
Chapter 5
2. When a whisker is pressed, what voltage occurs at the I/O pin monitoring
it? What binary value will the digitalRead function return? If digital pin 8 is
used to monitor the whisker circuit, what value does digitalRead return when a
whisker is pressed, and what value does it return when a whisker is not pressed?
4. What statements did this chapter use to call different navigation functions
based on whisker states?
This chapter used if, ifelse, and ifelse ifelse statements to evaluate whisker
conditions and call navigation functions.
If one condition turns out to be true, the code might need to evaluate another condition with a
nested if statement.