Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program mbot (mcore) Robot using mblock 3.4.11 (version) I am required to make the robot this: Create a piece of code that makes the robot

Program mbot (mcore) Robot using mblock 3.4.11 (version) I am required to make the robot this: "Create a piece of code that makes the robot drive straight until it gets within 10 cm of an object then stop until that object moves again." I need a screen shot how to plug those codes please and we are using "Arduino mode" since I am unable to make it work and it only makes a horrible sound. This is what I attempted and failedimage text in transcribed

mBlock - Based On Scratch From the MIT Media Lab(v3.4.11) - Disconnected - Not saved File Edit Connect Boards Extensions Language Help Scripts * * Back Upload to Arduino Edit with Arduino ID mBot Program Motion Events Looks Control Sound Sensing Pen Operators Data&Blocks Robots TITTO TUTTO MOUILLILILUTULT i #include 2 #include 3 #include XS forever ultrasonic sensor Port3 distance joystick Port3 X-Axis potentiometer Port3 set motor Miy speed 0 set motor M2 speed 0 else set motor M1 speed 50 set motor M2 speed 50 sound sensor Port3 limit switch Port1 Sloti Slot1 C temperature Port3 pir motion sensor Port2 7 MeDCMotor motor 9 (9); 8 MeDCMotor motor 10 (10); 9 void move(int direction, int speed) 10 { int leftSpeed = 0; int rightSpeed = 0; if (direction == 1) { left Speed = speed; rightSpeed = speed; }else if (direction == 2) { left Speed = -speed; rightSpeed = -speed; }else if (direction == 3){ left Speed = -speed; richtened-acad. avrdude.exe: 21408 bytes of flash written avrdude.exe: Send: o [51] [20] avrdude.exe: Recv: . (14) avrdude.exe: Recv: [10] 3-axis gyro X-Axis angle humiture sensor Portly humidity flame sensor Port3 gas sensor Port3 compass sensor Porti touch sensor Port1 button Port3 key1 pressed avrdude.exe done. Thank you. ir remote A pressed 23:27:30.736 2 #include 3 #include XS forever ultrasonic sensor Port3 distance joystick Port3 X-Axis potentiometer Port3 set motor Miy speed 0 set motor M2 speed 0 else set motor M1 speed 50 set motor M2 speed 50 sound sensor Port3 limit switch Port1 Sloti Slot1 C temperature Port3 pir motion sensor Port2 7 MeDCMotor motor 9 (9); 8 MeDCMotor motor 10 (10); 9 void move(int direction, int speed) 10 { int leftSpeed = 0; int rightSpeed = 0; if (direction == 1) { left Speed = speed; rightSpeed = speed; }else if (direction == 2) { left Speed = -speed; rightSpeed = -speed; }else if (direction == 3){ left Speed = -speed; richtened-acad. avrdude.exe: 21408 bytes of flash written avrdude.exe: Send: o [51] [20] avrdude.exe: Recv: . (14) avrdude.exe: Recv: [10] 3-axis gyro X-Axis angle humiture sensor Portly humidity flame sensor Port3 gas sensor Port3 compass sensor Porti touch sensor Port1 button Port3 key1 pressed avrdude.exe done. Thank you. ir remote A pressed 23:27:30.736

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

define task and social cohesion,

Answered: 1 week ago