Digital IO Agggggggggggg!
My team can’t seem to be able to get the digital IO ports working. We made a printf statement that just displays the state of digital_io_01 and also made the switch 2 led = to the state of digital_io_01. The led and the terminal window both say that digital_io_01 = 1. At first we thought that this was weird because there was no switch or anything attached that would close the circuit and make it 1. We attached a pwm cable and tried jumpering red to white and then tried to jumper black to white but there was no change in the state of digital_io_01. We have it configured as an input but we can’t seem to get the state of digital_io_01 to change from 1. How are we supposed to hook switches and other sensors that run on an on off basis to the Digital IO pins and get them to work. Also, in an unrelated question, how are we supposed to hook up a pot or other analogue sensor to the analogue input pins?
|