Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 6 months ago.
KL25Z Inverted GPIO (HIGH is LOW, LOW is HIGH, DigitalIn is DigitalOut , DigitalOut is DigitalIn)
Hello!
As the title says , I'm trying to program a KL25Z in mbed . More specifically , I'm trying to read a HC-SR04 Ultrasonic Sensor .
Echo (5V) is passed through a voltage divider so I can send 3.3V to KL .
The problem I'm having is that I can only send HIGH on a DigitalOut by writing a LOW ... and vice versa . The trigger pin defined as a DigitalOut is not outputting anything, while the echo pin defined as a DigitalIn is outputting 3.3V .
Did anybody else encounter this problem ? Am I doing something wrong ?
Thanks for reading my question !