I found an answer. I read in a book that I can't fork in a loop. But I can do up to 4 separate threads. So I did 3 threads:
Running/changing motors speed based on a variable "i" which is changed in other threads.
Waiting for a touch sensor A being bumped and increasing var "i".
Waiting for a touch sensor B being bumped and decreasing var "i".
Unfortunately, you cannot use the LEGO 8528 (NXT to RCX adapter) cable with sensors on the EV3. You can use it with motors though.
This is because the adapter cable only connects to pins 1 and 2 on the MINDSTORMS (RJ12) connector. On the NXT input (sensor) ports, pin 2 is GND.
On the EV3, however, pin 2 on the input port is no longer GND. It is used to ...
There is not one made by LEGO. However, there are a number of 3rd-party options:
Fatcatlab makes a Humidity Sensor (EV3 only).
Vernier makes a relative humidity sensor that can be used with the Vernier sensor adapter (EV3 and NXT).
There are also several temperature and humidity sensors from Grove that can be used with the mindsensors.com Grove sensor ...
The EV3-G programming language has mailbox blocks where it can receive bluetooth messages. You could write a program that until the touch sensor is pressed keeps processing the messages to control the robot.
The hard part here will be writing an app for the smartphone that sends the messages, however the BT protocol EV3 uses is documented and apps are ...
Your example doesn't read a RLI value. It reads and stores a color index value (0 through 8). This wouldn't stop you using the variable, but the value may not be what you expect.
Variables are global. You can read or write them anywhere in your program. The value of the variable is the last value written. Variables are not persistant. When your ...
First guess: the wait for button command is bad practice. Well, not the whole thing, just the use of the middle button. The reason is that that button is also used to start the program. The program may be jumping past the wait for and saving to "Midpoint" before humans notice that the program has started. Try any other brick button.
You may be able to rig something up with a Vernier Sensor Adapter, the Vernier EV3 Sensor Block, and a Vernier microphone. Although the NXT sound sensor can be made compatible with EV3, it would seem it only measures volume, and cannot measure frequency.
Check for 5V on the two middle pins of the motor connectors (plug a cable into the brick, no motor on the other end, and measure volatege on the contacts of the open other end). NXT/EV3 have separate power to all the sensors, if there's a short (failed capacitor or similar) or the power chip failed then the brick will still work, but the sensors won't get ...