Question

Problem statement: Create and open a. Create a new. rbt file with conditional statemebt that will have a parking motion with

can someone help me with the with the use of LEGO MINSTORMS Education NXT Programming

thank you in advance

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The new NXT Programming is replaces the old RCX.

A highly versatile palette of LEGO Technic elements combines with ultrasonic sound, light and touch sensors.

The use of LEGO MINDSTORMS NXT software enables you to program your NXT robotic invention and upload your programs to the NXT via USB or Bluetooth connectivity.

To build a program that runs endlessly, you have first to put a loop block on the work space. This block can be found under the flow blocks. To put it on the work space just drag and drop it to the right-hand side of the starting point on the work space. If you put it on the right place, you will see that the sequence beam will connect automatically the starting point with the loop block. The program is designed for the drag and drop principle. so all you have to do is to put different blocks - for controlling motors, sensors or making decisions and loops etc.

Regarding the Problem Statement above i have solution with the program below with pseudocode:

if (PIR does not detect OR ANY sonar is out of range) { // condition 1
stop
} else if (PIR does detect AND right sonar is in range) { // condition 2
turn right
} else if (PIR does detect AND left sonar is in range) { // condition 3
turn left
} else if (PIR does detect AND center sonar is in range) { // condition 4
go straight
}

if condition 1 is false, then that means that the PIR does detect AND ALL of the sonars are in range. Which implies that condition 2 is necessarily true. Which implies that the following elses have no effect. Your code can then be optimized (and the compiler probably did optimize it) into

if (ANY sonar is out of range OR PIR does not detect) { // condition 1
stop
} else { // condition 2 is true if condition 1. is false
turn right
}

Add a comment
Know the answer?
Add Answer to:
can someone help me with the with the use of LEGO MINSTORMS Education NXT Programming thank...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Can someone help create this program for Linux. Part 3. IPC (InterProcess Communication) Programming In Part...

    Can someone help create this program for Linux. Part 3. IPC (InterProcess Communication) Programming In Part 3, you are asked to develop a multithreaded program and a Makefile to automate the compilation on Linux platform. This assignment assists you for better understanding of processes and threads management, multithreaded programming, and enhancing programming skills and experience with programming on a Unix-like environment. You are asked to implement a multithreaded producer-consumer problem with PThreads library in this programming assignment. The producer-consumer is...

  • C++ Can someone please help me with this problem- commenting each line of code so I...

    C++ Can someone please help me with this problem- commenting each line of code so I can understand how to solve this problem using the C++ programming language? I really need help understanding how to create a file for the program to read. Do I create the file in Visual basic or create a text file? I have the code, just need to know how to create the file for it to read. #include<fstream> #include<iostream> using namespace std; int main()...

  • Can someone plz help me??? I would like a website that has to do with guitars...

    Can someone plz help me??? I would like a website that has to do with guitars or something to do with music, someone asked me what kind of website I would like to have and that would be awesome. The attributes to be included, are below. I need a small website that to where I need to interlink a CSS file into the HTML file. I don't know to save the files to have to be able to run with...

  • Please do the following project in C++ programming language. You can use a bag to create...

    Please do the following project in C++ programming language. You can use a bag to create a spell checker. The bag serves as a dictionary and contains a collection of correctly of correctly spelled workds. To see whether a word is spelled correctly, you see whether it is contained in the dictionary. Use this scheme to create a spell checker for the words in an external file. To simplify your task, restrict your dictionary to a manageable size. The dictionary...

  • C++ programming question Topic: Class 'Date' Hello everybody, can some one help me... ... Write a...

    C++ programming question Topic: Class 'Date' Hello everybody, can some one help me... ... Write a class Date with the following properties: a) Data elements of the class are day, month, year. All three data elements are defined by the Type int. b) A set and a get element function are to be provided for each data element. In Within the framework of this task, it should be assumed that the values that are passed for day and year, are...

  • SAS programming . Can someone help me on report 2 it’s not working and I do...

    SAS programming . Can someone help me on report 2 it’s not working and I do not know if I’m doing it right. 12.14.4.4. 2.1.2. 3.4.2 3 2 5 2 5 1 5 1 3 5 5 2 5 4 1 1 5.5 3.5.5.3.5-53-3-1, 1,3-3.12 334 3423 53533.22125253142 1 545 322142433 13451551 54514 5.4.1 4.3.3.1 5.22 201 201 009 210 201 202 013 004 005 006 997 300 009 400 400 004 ons dos 100 102 103 104 105 006...

  • Can someone please help me with this code? I'm writing in C++. Thank you in advance....

    Can someone please help me with this code? I'm writing in C++. Thank you in advance. Complete a program that represents a Magic Eight Ball (a Magic Eight Ball allows you to ask questions and receive one of several random answers). In order to complete this, you will need a couple of new functions. First, in order to get a line of input that can contain spaces, you cannot use cin, but instead will use getline: string question; cout <<...

  • Need help about C PROGRAMMING,, pls use only C LANGUAGE.., yea so im doing this exercise...

    Need help about C PROGRAMMING,, pls use only C LANGUAGE.., yea so im doing this exercise as a practice for c programming, could someone do this as well so i could compare if my code makes makes sense and to see and help correct the errors im getting right now.. Any helpful help would be appreciated.. Pointers &Pointer arithmetic Memory allocation and freeing Main topics: Exercise This lab is designed to give you practice working with pointers and memory allocation...

  • Can someone help me with these? Thank you in advance! 1. The circuit shown here can't...

    Can someone help me with these? Thank you in advance! 1. The circuit shown here can't be reduced, since none of the resistors are connected in series or in parallel with each other. The unlabeled arrows show the direction of current in resistors 2, 4, and 5. Use Kirchhoff's junction or loop rules to answer questions (a)-(c) below. Show work for all calculations, and briefly explain your reasoning on current direction in (a) and (b). The symbols Ii, h, etc....

  • Can someone please help me with all the parts in this optics free response problem? 3....

    Can someone please help me with all the parts in this optics free response problem? 3. (12 points, suggested time 25 minutes) Students are asked to perform an experiment to determine the focal length of a converging lens. They are given an optical bench that includes a lamp, a converging lens in a holder, and a screen. All three of these can be positioned anywhere along the optical bench. The students decide to form real images by placing the lamp...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT