Community
cancel
Showing results for 
Search instead for 
Did you mean: 
HHigo
Beginner
1,446 Views

Save data just before shutting down

Here's the problem:

I'm making a project using Intel Galileo Gen 2 and a car. My problem is that when I turn the car on, it turns galileo too, but when I turn it off, the board shuts down instantaneously and I can't save the data on my database properly. I know I can have a switch to turn on and off everytime, but my goal is to use that automatically like it isn't even there. So:

How to use a battery to keep the board alive until I save everything?

or

How to know when it's is turned off, so I can save it all? 

 Thanks in advance!
0 Kudos
3 Replies
idata
Community Manager
53 Views

Hi Anjoshigor,

 

 

Nice project! If I'm understanding you correctly, the power supply is connected directly to both devices (Car and Galileo Gen2), right? And it makes sense because it is like any device that shuts down when is disconnected.

 

 

Personally I can recommend you two ways to try to solve your issue:

 

 

1- In your Galileo code, try to save the data right after the Galileo receives it. In that way you make sure that the data is in the database.

 

 

2- Implement a microcontroller that controls a relay circuit, so every time that you shut down the car the microcontroller sends a signal to the Galileo to save the data and when it finishes it send a signal back to the microcontroller to turn off the system.

 

 

I think that there is too many ways to try to solve it, and these 2 are the ones that comes to my mind.

 

 

I hope you find this information useful.

 

 

Regards,

 

-Leonardo
FTinetti
Honored Contributor I
53 Views

Hi anjoshigor,

I think there is no way of knowing the Galileo is turned off unless you implement something like a power switch as that mentioned at .

What database are you using?

Fernando.

idata
Community Manager
53 Views

Hi Anjoshigor,

 

 

Do you have any updates of this case? Did you try any of my recommendations?

 

 

Remember that we are here to help you.

 

 

Regards,

 

-Leonardo
Reply