Jump to content

Recommended Posts

Posted

Heyy , so i'm building a fire fighting robot. Τhe robot is moving autonomously and trying to find a candle. When the program starts it gets a temperature's value and start moving. The order of the movement is forth then right then left and then back to the starting position. The problem that i have is that while it's moving right or left it doesn't detect the change of the temperature . The robot is only detecting the increase of temperature only when it's steady. So, i wanted to ask if that is a problem of my code .

I'm posting the code of my program if someone wants to check it if i got something wrong. I used a touch sensor and a supersonic person to dodge the obstacles. 

This is the link for the coding because i can't upload it here . https://drive.google.com/open?id=1j5Lw7X3oEz8Wz7jmjtGCd2TjVQ2ltwKQ 

Posted

have you tried using multitsking? i think the reason for your problem is that the motorblock you turns for 1 sec. or something and during the turning of the motor it doesnt prodeed with the program and your temperature isnt mesured.

XGBC

Posted
23 minutes ago, XGBC said:

have you tried using multitsking? i think the reason for your problem is that the motorblock you turns for 1 sec. or something and during the turning of the motor it doesnt prodeed with the program and your temperature isnt mesured.

XGBC

What do u mean using multitasking? On the first code that i made the turn had a timer of 3 seconds. I changed it to 1 because while it's moving right or left it doesn't detect the change of the temperature.

Posted

by multitasking i mean having one loop for moving the robot and another one for meassuring the temperature

XGBC

Posted
13 hours ago, XGBC said:

by multitasking i mean having one loop for moving the robot and another one for meassuring the temperature

XGBC

I haven't thought about that. If i do that would the robot measure the temperature and avoid obstacles all the time while it's moving ? 
Can u give me a simple example of how can i multitask? 

Posted

i sadly cant give you an example because i havnt got mindstorms ev3 robot right now but basicaly what you need to do is you need to put two "start" blocks in your program  and have one for moving the robot and another one for meassuring the temperature. i can try and write something for you tomorrow.

Posted
23 hours ago, XGBC said:

i sadly cant give you an example because i havnt got mindstorms ev3 robot right now but basicaly what you need to do is you need to put two "start" blocks in your program  and have one for moving the robot and another one for meassuring the temperature. i can try and write something for you tomorrow.

I didn't know that i could use two start blocks on the same program. I tried to do some coding based on ur idea but i don't know if it works because my robot's batteries ran out :P

If u have some time to check it i would be glad . 

https://drive.google.com/open?id=1D1TTPZI8_ygUbo_aCKV2klM6wPI_gfe9

 

Posted
2 hours ago, XGBC said:

sadly i dont have time to check in the next few weeks sorry but i will do it when i find some time

XGBC

Okay. I posted a screenshot of my code. Anyway, I'll try to make it work while I'm waiting for ur answer. Thanks for the help bro ?

  • 3 weeks later...
Posted

your screenshot should work. try it out! Sadly ive only now found time to look at your program i ve been busy with other projects.

XG BC (Same guy as XGBC for some reason i cant accces my old account anymore)

Posted
On 2/17/2019 at 1:11 PM, XG BC said:

your screenshot should work. try it out! Sadly ive only now found time to look at your program i ve been busy with other projects.

XG BC (Same guy as XGBC for some reason i cant accces my old account anymore)

Sadly it didn't work... Don't know what to do now

Posted
2 hours ago, XG BC said:

hmmm sadly i dont know whats wrong too.

XG BC

The thing is that it won't start at all. It's loading the code and then it won't move. 

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...