6 years, 10 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 !

Be the first to answer this question.