Announcement

REXYGEN forum has been moved. This one is closed.
Head over to the new REXYGEN Community Forum at https://forum.rexygen.com.

Looking forward to meeting you there!
 

#1 2017-03-12 23:32:47

mikeyh
Member
From: New Zealand
Registered: 2016-04-28
Posts: 44

safe shut down

Hi,

I'm looking at creating a safe shut sown for my raspberry pi/monarco hat HW. What is the best way to do this?

I just need the HW and SW to stop before the power is turned off so not to corrupt anything. From within REX I think I can use the OSCALL block set to "system halt". Is there a way I can do this through HW so it can be done locally, and not use to many of the monarco hat I/O?

Cheers

Mike

Offline

#2 2017-03-13 13:20:07

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: safe shut down

Hi Mike,

thank you for your question. REX function block OSCALL is a good choice. In order to use it as a HW "Shut down" button you can connect its TRG input with Digital Input in your REX project.
If you are using MonarcoHAT you can use either MonarcoHAT DI or ordinary Raspberry Pi GPIO. Better go for the Raspberry Pi GPIO if you want to save some MonarcoHAT DIOs for your project.

Physical connection of push button to Raspberry Pi GPIO can be seen e.g. here: https://youtu.be/Bqk6M_XdIC0.

Please let me know if you have any questions.

Regards, Tomas

Offline

#3 2017-03-13 20:29:29

mikeyh
Member
From: New Zealand
Registered: 2016-04-28
Posts: 44

Re: safe shut down

Hi Tomas,

Thanks for the help. Will I need to load the rpi module/driver as well or does the monarco hat driver include what is needed?

Cheers

Mike

Offline

#4 2017-03-14 07:43:56

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: safe shut down

Hi Mike,

yes, RpiDrv is necessary for use of Raspberry Pi GPIOs within REX.

Good luck with your project!

Cheers, Tomas

Offline

#5 2017-03-15 21:06:56

mikeyh
Member
From: New Zealand
Registered: 2016-04-28
Posts: 44

Re: safe shut down

Thanks Tomas

Offline

Board footer

Powered by FluxBB