How do I stop a mindstorms program? - lego-mindstorms

How do I stop an EV3 program that is in an infinite loop? (I didn't remove the batteries because it might damage it). I have the stock lego firmware installed.

just press the button on the top left simple.

I found out: Hold the back button, left button, and center button. When the screen goes blank release the back button.
If you're using the official LabView, you can just press the back button. This doesn't work when you use c4ev3.

Your problem is that you need to use LabView which should come for free with the kit. if you are using C then you need to program in a parallel wait block as an exit contingency which will keep looking for an input by the user or its sensors, say from brick buttons or a touch sensor. then make it terminate the other code in the program and then itself.
p.s. you can also download the software-firmware package (including LabView) for free on the lego website under 'Downloads' in the mindstorms section

Related

Intercept Vive controller input?

I'm building an openvr app for steamvr to assist with seated play (my room is small so my tracking area isn't ideal). My app pretty much just adjusts the play-area height when I hold the grip button and "scroll" on the touchpad so that I can reach objects that are too low/high at variable heights. (I tried "OpenVR Advanced Settings" but the options for keybinding with it is limited to simple button presses so I decided to make my own version).
I'd like to prevent touchpad input from being sent to the game while the grip button is being held, so that the moving on the touchpad doesn't cause movement in game, is this possible at all?
I'm assuming it's not possible, but wondering whether anyone has had any experience with this.
After your clarification in the comments the answer is no, you can not "eat up" device inputs in an application, I usually work on OpenVR drivers and there after you submit a device input and/or any other event its available to anything that expects pose update events, and event subscribers can not stop others from receiving the said events
However there might be a work around (if its still an issue) I know of at least 1 application that can do what you want and that application is OVR Toolkit (when the overlay is active and you try to click something in the overlay, the game running in parallel will not receive the input, however that will only happen if OVR Toolkit overlay surface receives input, it may be a built in OpenVR overlay feature and you don't have to do anything or it can be defined by the developer, I don't really have a want to test this right now)
Sadly though OVR Toolkit is not open source, but there is an open source toolkit for unity for making overlays, which is open source and might be the solution you're looking for, it can be found here

Unity 3D - Problems with Mad Catz R.A.T. Pro X extra buttons

A few Days ago my loved PC Mouse, a Razer Death Adder, died because of a rage attack of my boyfriend. So I decided to get a new one from Mad Catz, because why not trying ... A few days later I got her, a very nice Mad Catz R.A.T. PRO X.
I'm working with Unity 3D in the Version 4.0.0.0f. You may ask yourself why I'm not using the newest version? Answer is simple, I'm not allowed to, my University says all projects have to be done in the Version 4.0.0.0f.
Enough from the introduction... While testing a game I made, I pressed the DPI-Button on the R.A.T. and my character starts to constantly moving forward. It only stops if I leave the Screen and use for example my browser or another program or I restart unity completely.
I wrote a small script to show me what Buttons are pressed while I pressed the DPI-Button. It turns out that the following BUttons are Pressed if I press the DPI-Button:
JoystickButton6
Joystick1Button6
So I had a look in the Mad Catz Software and tried do define a custom Profile where the DPI-Button is simply a Shiftkey, the Software looks good but it had the same result in the game.
Is there any Unity 3D Developer with a Mad Catz R.A.T. PRO X with the same problem?
A simple Solution is to disable the Controller Driver of the Mouse.
It can be achieved by disabeling the driver in the computer management!

Detect Touchpad event in C++ Builder

I am writing an API in C++ Builder that collects information for events on the touchpad of a windows laptop.
This is how I was doing it.
I was creating a window
when the touch pad is touched, I simply paint that information on that window in WM_PAINT event.
But now I dont want to create that window (form), i want to catch all the events, even if user is on desktop screen or on another application's window. If an application that is using my API is running in background i want to be able to get that touch even information in the code. How can I do that??
I hope you are getting my point ... actually i want to do it in a seamless way, otherwise that white form window will irritate the user.
I also want to save these events in a link list and want to return that out of the API is it possible??
I will be very thankful for your time. I really need to work it out in next few hours.
The touchpad is just a mouse like any other. It generates standard mouse events. Use a global WH_MOUSE hook via SetWindowsHookEx() to capture mouse events globally. To replay them, use mouse_event(). Alternatively, use WH_JOURNALRECORD and WH_JOURNALPLAYBACK hooks instead for capture and playback, respectively.

Keyboard assistance for iPhone simulator

My game has a swipe up gesture recognition that does something. Because I use it a lot and making swipe on iPhone Simulator is not easy I want to use the real keyboard instead.
How can I capture the real keyboard (the one connected to the pc running the simulator) presses to do the thing instead of having to swipe with the mouse?
Well, I would suggest using real hardware to do this if thats the problem. But you obviously dont want to take that route OR, dont want to pay the $99 bucks yet. So I suggest creating a macro that does the mouse movement for you. You can create a macro that repeatedly does a mouse click, move and unclick (a swipe gesture). Over and over again with a pause interval inbetween. You can then set a hotkey like (CTRL + M) that will start and stop the macro. Good luck.

xrandr: jail mouse

I already asked this questions over at Ask Ubunutu. Unfortunately I have not received an answer. As this question is not Ubunutu specific, I am trying it here.
I am using xrandr via console to enable/disable secondary monitors. This work fine so far. Unfortuantely if I move my mouse beyond one screen, it appears on the other one. How can I disable this feature - and lock the mouse to one screen?
I use Ubunutu 10.10 and awesome - no gnome/kde.
I've never seen anything in the Xrandr or Xinerama docs about restricting mouse movement to a single monitor.
And, before Xinerama, I used to run multiple X screens on multiple monitors, but the mouse moved freely between the monitors without trouble. (Windows were stuck on the monitor they started on; it worked much better than it sounds. :) So that's probably out.
You may be able to solve this starting another X server. Configure the second X11 for the correct screen, no mouse (keyboard too?) input device, and start clients on that second X server using DISPLAY=:1 xterm & and so forth.