Jump to content

Recommended Posts

Posted (edited)

Hello people, 

we need to make a car with  LEGO mindstorms ev3 for a school project. 
We need to do some challenges and races. 
We have some problems with programming the EV3 stone. Is it possible to use the motors handmatic with the commander app and for example when the lightsensor see a red line the electric motor will shut down automatic? 
Can someone tell me if this is possible and tell me how you can program this ? 

Thank you

Edited by SwenDomburg
Posted

It's a bit hard to understand you question, but I will try to answer it...

It is not possible to program the EV3 with the commander app - it's only used as a remote control. :sceptic:

But it is quite easy to program it using a computer running the EV3 program - it's as simple as: Turn motors on -> Wait for light sensor to detect red -> Turn motors off. :wink:

Also, welcome to Eurobricks!

Posted

Good question. If you only want to do 'simple' things with the EV3, I think you can use the remote. 

You can also make an app with AppInventor, but that's a bit more challenging. 

 

Hope this helps... And welcome to Eurobricks! :wink:

Posted

@mocbuild101 thank you for your reaction. I will explain the problem. We have a sumo war challenge with 6 people in a circle. The circle line is red. The game is that you need to push someone else out of the circle. When your car is running over the line the motors needs to stop and your ev3 must play a sound. 
And someone else "said" it is possible ?? 

Posted

Its certainly possible with the colour sensor.  Unfortunately, I'm a little rusty with the programming specifics but, I don't recall it being difficult to work out and I'm sure that someone else here will be able to point you in the right direction.

Posted

You could come and join our "Basic EV3" programming session next Tuesday @Deltion College in Zwolle. ±16.00 - 18.00 (PM if you want more info).

Posted

The Programmer app or PC software will be required for what you are asking. You can create a loop that checks if the colour sensor has detected red, stop the motor, play a sound and then end the program. Once the program is on the Brick you can start it and also use remote control (IR) not sure about Bluetooth.

Posted

Well. The thing is: You can´t program your car with the "Commander App". This App only allows you to "drive" the car. Example: you push one button = one motor runs.

That app only reads info from the EV3 sensors. That means that when your color sensor reads red, the apps will display the color red.

There's no way to introduce the functionality that you want, just because the "program" that the App uses is part of the EV3 firmware.

 

To really program your EV3 you need Lego Mindstorms Programming App or the Mac/PC software. That's where you "write" your program (It's not actually writing since the app uses graphic blocks)

To add the functionality that you mentioned, all you have to do is to introduce a parallel thread in your program like the picture shows.

That line has three blocks:

1. The execution of the thread waits in the first block until the color sensor reads red and then it continues to the second block.

2. This block stop the loop that actually controls/drives your car: the car stops.

3. This block plays a sound.

The real problem is the loop that control/drive your car. To answer you question: As far as I know, you can't write a program with the Lego Mindstorms Programing Software that actually listens the "Controller App".

You can write a loop that listens commands from:

1. The EV3 Remote Control (via Infrared Sensor)

2. Another EV3 Brick (via Bluetooth)

Untitled copy.png

Posted

We have solved our problem. With the RemotEV3 app is it possible to drive the car manual and use a program on your brick at the same time. 
The only thing is that you can stop your program but you also need to stop running the car with the RemotEV3 app. 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...