HC-04 interface with nRF51422

Murugan gravatar image

asked 2017-08-12 08:10:17 +0100

Dear Nordic Team,

Thanks for supporting.

Anybody work with ultrasonic sensor (HC-04). Please guide me. I am just interface with arduino example its working good. It have built in function for "pulseIn". I dont know how to make this function in nRF51422 keil version. Please support.

edit retag flag offensive close delete report spam

1 answer

Sort by » oldest newest most voted
joh2 gravatar image

answered 2017-08-14 11:23:32 +0100


You need to configure the GPIO for HIGH/LOW sensing and use the generated interrupts to start and stop a timer.

Check out this answer.

Best regards,


edit flag offensive delete publish link more


And note that device appears to be 5v so think carefully about how you interface it (unless there's a 3v version I didn't find).

RK ( 2017-08-14 14:25:18 +0100 )editconvert to answer

@Jørgen , Thanks for reply. Already i got that link but show me a error "Object is unavailable".

Murugan ( 2017-08-16 06:09:31 +0100 )editconvert to answer

@RK , Thanks for your advice. But i am work with ESP8266 node mcu module. Its working fine

Murugan ( 2017-08-16 06:10:59 +0100 )editconvert to answer

@Murugan, you can download the latest nRF5 SDK with support for nRF51 series (SDK 12.3.0) on this page. The example documentation is found here: GPIOTE - TIMER.

Jørgen Holmefjord ( 2017-08-16 09:08:11 +0100 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

Question Tools

1 follower


Asked: 2017-08-12 08:10:17 +0100

Seen: 56 times

Last updated: aug. 14