RMT peripheral and reading a pin
Posted: Mon Aug 06, 2018 7:56 pm
This is what I am trying to achieve:
I think using RMT should do it but when I tried it didn't seem to work. Any suggestions or sample code?
Code: Select all
do for 25 times:
set PIN_OUT for output
set PIN_IN for input
send 1 microsecond pulse to PIN_OUT (HIGH for 1 microsecond, LOW for the next microsecond)
immediately read PIN_IN status (HIGH or LOW)
store value
I think using RMT should do it but when I tried it didn't seem to work. Any suggestions or sample code?