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

I am using the NRF2840 and WaveShare's 2.9 epaper display to make a cutdown tool, but I am facing some problems.

I have realized the cutdown function with the examples. But now I want to reflesh the number I have published, which means that I first publish a number, then I want to publish a new number. But now, the new number i published can't preemptive the old number. I want to know how to replace the old number. Thanks for all of your effort.

yours sincerely,

Leo Li.

Parents Reply Children
  • Thank you for your reply. I am sorry that I don't describe my question very clearly. I have update my question in the previous answers by awneil. You can go to that answer to know further things. Thank you very much.

  • leo li said:
    For example, I have passed a number and the number is decreasing on the e-paper. But now I want to restart the cutdown with a new number, how could I realize this function.

     Probably the same way that you sent the number the first time. How did you do that? And what happens if you try to refresh the number the same way that you did earlier?

  • I am using the bluetooth uart module. I wish the new number would replace the old one immediately. But now the number will replace when the old one decreases to 0. I wonder if the NRF52840 module is preemptive or not and how to realize this function.

  • It's still unclear what your actual problem is:

    1. Transferring the new number over BLE to your module?
       
    2. In your module firmware, getting access to the new number?
       
    3. Writing the new number onto the display?
       
    4. Other ... ?

    Again, the question of how to write to and update the display has nothing to do with Nordic: the display neither knows nor cares what microcontroller you use - it works the same whatever is driving it.

    Therefore, you need to go to the display documentation, and/or the manufacturer, for details of how to control the display.

  • When you write a new number it will replace the old number in the service. If the counter isn't updated, then that is because of how you treat it in your application.

    The nus_data_handler() is called when you "refresh" the number by sending the number to your characteristic. How you use this number after that is up to the application. I don't know how you use this event, and how you start your countdown, but it sounds like you need to abort the current countdown, and start it again with the new number.

Related