This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

button exmaple is not working in SDK version 9.0.0

Hello evryone,

i cloned button example form github to sdk version 9.0.0 and i modified the neccesary changes between app.gpiote.c//nrf_drv_gpiote.c files and set the GPIOTE ENABLED to 0 after that it is getting compiled with no errors but the baord shows nothing if the press any of the button can anyone suggest me what modifications has to be done or any changes?

ble_app_template.zip

Thank you

prabhu

  • has there been any progress prabhu here? I am working from home today, so i will not get a chance to run your project as i do not have any devices here.

  • yes am still facing a lot of problems concerning the timer issue i am using 2 timers one for 3sec and another for 5 sec but the real problem is when i press the button for 3 sec it is making buzzer beep and whenever i press the button for 5 sec it is making buzzer beep when it reaches 3 sec and at the end of 5 sec it turns of device could you tell me how to resolve this issue i want buzzer to be beeped only for 3 sec timer not for 5 sec timer

  • When you are using the same button for recognizing 3 seconds push and 5 seconds push then it is normal that it is getting confused when you 3 seconds are expired.

    t You can change your logic like this. When you press the button, start the 3 second timer. When the 3 sec timer expires and its callback is called, check if the button is still pressed, If it is still shows that the button is pressed, start 2 seconds timer. When the two seconds timer expires and the callback is called, check again if the button is being pressed. If it is not pressed, then it was 3 seconds push and start the buzzer. If it is still being pressed it is a 5 second push so stop the buzzer.

  • Thfor your feedback and suggestion i will try to implement that logic and meanwhile could you give me some solution for overcome this isssue if possible it would be really helpful for me to proceed further devzone.nordicsemi.com/.../

  • You now have opened a new case regarding the exact same thing we were dealing here.

    devzone.nordicsemi.com/.../ I have asked you to implement a logic and looking at the main file attached in the new thread, you have not implemented it. Another problem in your code is that In the pwm_init function you initialize pwm library start pwm, wait for 10ms and stop pwm and uninit the pwm library.

    I am attaching the code fixed with my suggestion. I have not compiled it but you can see the logic i was suggesting.

    edit: removed old main.c file which is outdated and not relavant

    I will close the other case as duplicate. I can see that you are not happy with my inputs here, even though i have spent hours on trying to explain you things in detail. So I will stop looking into this case from now. Wish you good luck with your project.

Related