Programming on-board reset button



  • There is a button on expansion dock which is used for restarting the omega as well as doing a factory reset, I want to use this button for learning purpose, how can I change it's behavior so that it doesn't restart omega but instead execute my logic.



  • @Ali-Amjad Unfortunately, I don't think this would be easy to do.
    From viewing the circuit diagrams for the Expansion Dock and the Omega itself, the reset button connects to a reset pin on the main CPU chip.

    While I don't know for sure how the reset pin serves the dual purpose of both a restart and a factory reset, I would think it is something like this:

    1. Initial press on the reset triggers a restart of the Omega
    2. If the reset is held for a period, when the restart occurs the fact that the reset button is still held causes the Omega to run the factory reset code instead of the normal restart

    Consequently, to repurpose the reset button would require:

    • Either, physically disconnecting the reset button from the CPU reset line and connecting it to some GPIO pin

    • Or, modifying the core OS code to behave differently when the reset button is pressed

    Neither of these would be easy to do. Even if you could do these, you would also loose the restart and factory reset functionality.

    If you want to experiment and learn using buttons to execute code, you would be better off connecting a button to one of the standard GPIO pins using circuitry like:
    0_1471216580940_upload-83a6ffff-2d6c-4a59-bcbd-21f7746bca72

    You will of course also require code to access the state of the relevant GPIO pin (GPIO-n) and perform your required actions. If you need to know more about how to do this, just ask and I will provide some pointers to you.



  • @Kit-Bishop Thank you, I am actually using Nodejs to do my programming, I was just curious if I can use the builtin button because I still haven't received my shipment of hardware components but now I guess I have to go with my own push button.



  • This post is deleted!

Log in to reply
 

Looks like your connection to Onion Community was lost, please wait while we try to reconnect.