How to shutdown EV3 by leJOS locally?

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

How to shutdown EV3 by leJOS locally?

Postby Programus » Sun Jun 15, 2014 8:51 am

For NXT, there is a NXT.shutdown() method which could shutdown the brick.
What is the equivalence in EV3?

I found there is a shutdown() method in Menu interface and RMIMenu, but I didn't find anyway to do it on EV3 locally. :(
User avatar
Programus
Novice
 
Posts: 34
Joined: Fri Sep 18, 2009 1:43 pm
Location: China

Re: How to shutdown EV3 by leJOS locally?

Postby gloomyandy » Sun Jun 15, 2014 4:10 pm

Have you tried looking at the menu code to see what it does to shutdown the EV3?
https://sourceforge.net/p/lejos/ev3/ci/ ... java#l2053
Remember you are simply on a Linux system now, so you can do stuff like this just using standard Linux commands. What is it you are doing that requires a Java program to close down the EV3?
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4000
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: How to shutdown EV3 by leJOS locally?

Postby Programus » Mon Jun 23, 2014 2:17 pm

gloomyandy wrote:Have you tried looking at the menu code to see what it does to shutdown the EV3?
https://sourceforge.net/p/lejos/ev3/ci/ ... java#l2053
Remember you are simply on a Linux system now, so you can do stuff like this just using standard Linux commands. What is it you are doing that requires a Java program to close down the EV3?


Thank you for your great advice. That is a solution of my problem.
While, actually, the same idea came to my mind after I posted this question. :)
But I still want to use things provided by leJOS if there is anything available because I consider that as the "standard" way when developing by leJOS.

I am building a robot pet and hope it could shut itself down when the battery went low which make the brick shut itself down suddenly, so that the program could save some data of status to file before the brick down.
By this way, a shutdown or battery change would be just a nap for the robot pet instead of a death/rebirth.

I think adding a shutdown method into Brick interface would make leJOS for EV3 easier to use especially when making robot like I am building and more compatible with leJOS for NXT. 8)

By the way, building an electronic version useless box also need a shutdown method.
I made one by NXT some years ago. You can find how it works here (from 00:28): http://v.youku.com/v_show/id_XMjM1NDk2Njgw.html
(Video in Chinese)
User avatar
Programus
Novice
 
Posts: 34
Joined: Fri Sep 18, 2009 1:43 pm
Location: China


Return to EV3 Software

Who is online

Users browsing this forum: No registered users and 3 guests

more stuff