Course Solutions Uncategorized (Solved) : Comment Code Using Mbed Include Mbedh Include Servoh Digitalout Led1 P5 Digitalout Led2 P6 Q28733240 . . . .

(Solved) : Comment Code Using Mbed Include Mbedh Include Servoh Digitalout Led1 P5 Digitalout Led2 P6 Q28733240 . . . .

 

can you comment all the code below I am using mbed

#include “mbed.h”
#include “Servo.h”
/*
DigitalOut led1(p5);
DigitalOut led2(p6);
DigitalOut led3(p7);
DigitalOut led4(p8);
DigitalOut led5(p9);
DigitalOut led6(p10);
DigitalOut led7(p11);
DigitalOut led8(p12);
DigitalOut led9(p13);
DigitalOut led10(p14);
DigitalOut ledG(p22);
DigitalOut ledY(p23);
DigitalOut ledR(p24);
*/

Servo myservo(p21);

Serial pc(USBTX, USBRX);

int count = 1;
int level = 1;
float delay;
float p;

InterruptIn play(p15);

void routine()
{
led[count-1] = 1;
wait(0.5);
led[count-1] = 0;
wait(0.5);

led[count-1] = 1;
wait(0.5);
led[count-1] = 0;
wait(0.5);

led[count-1] = 1;
wait(0.5);
led[count-1] = 0;
wait(0.5);

if(count < level)
{
led[level-1] = 0;
count = 1;
level = 1;
myservo = 0.0;
wait(0.2);
delay = 0.25/level;

//servo to level
}

else
{
led[level-1] = 0;
count = 1;
level++;
p = (level-1)/10.0;
myservo = p;
wait(0.2);
delay = 0.25/level;
}

if(level > 9)
{

count = 1;
level = 1;
p = (level-1)/10.0;
myservo = p;
wait(0.2);
delay = 0.25/level;
side[0]=1;
side[1]=1;
side[2]=1;
  
wait(0.5);
side[0]=0;
side[1]=0;
side[2]=0;
  
wait(0.5);
  
side[0]=1;
side[1]=1;
side[2]=1;
  
wait(1);
side[0]=0;
side[1]=0;
side[2]=0;
  
wait(0.5);
  
side[0]=1;
side[1]=1;
side[2]=1;
  
wait(1);
side[0]=0;
side[1]=0;
side[2]=0;
  
wait(0.5);
  
  
  
//Call winner
}

}

int main() {
  
side[0]=0;
side[1]=0;
side[2]=0;
//led[9] = 1;
play.rise(&routine);
count = 1;
level = 1;
delay = 0.25/level;
p = 0.0;
myservo

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Answered):Has Western Secularism And Materialism Had Any Impact On These Peoples Belief Of The Religious Practices 1 . . . .(Answered):Has Western Secularism And Materialism Had Any Impact On These Peoples Belief Of The Religious Practices 1 . . . .

<h3>Question Description</h3> <p>Students are to create a multi-paragraphed essay that respond to the following and includes a Works Citied page for outside sources:</p><p><strong>After reading about and researching information of the

(Solved) : Give 100 Thumbs Perfect Need Fix Code Make Selection Sort Sorts Part 1 Public Class Mysel Q32966956 . . . .(Solved) : Give 100 Thumbs Perfect Need Fix Code Make Selection Sort Sorts Part 1 Public Class Mysel Q32966956 . . . .

<p>Will give 100% Thumbs up if its perfect. Need to fix this codeto make a selection sort that sorts this: .</p><p>PART 1:</p><p>public class MySelectionSort {<br/><br/>    public static int[] doSelectionSort(int[]placer){<br/>         <br/>        for (<strong>complete