Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1/Consider the following Arduino sketch int myByte=0; int myStatus=0; void myClo

ID: 3542337 • Letter: 1

Question

 1/Consider the following Arduino sketch 
 int myByte=0;
 int myStatus=0;
 
void myClock(){
   while (digitalRead(0)) {
   myStatus=0;}
   myStatus=1; //falling edge detected
 }
 void setup()
 { pinMode(0,INPUT);
   pinMode(1,OUTPUT);
   pinMode(3,OUTPUT);
   pinMode(4,INPUT);
   pinMode(5,INPUT);
   pinMode(6,INPUT);
   pinMode(7,INPUT);
   pinMode(8,INPUT);
   pinMode(9,INPUT);
   pinMode(10,INPUT);
   pinMode(11,INPUT);
   Serial.begin(9600);
   Serial.println("I am ready!");
 
 }
 
void loop()
 {
   myClock();
  
   while (myStatus)
   {
     myByte=128*digitalRead(4) + 64*digitalRead(5) + 32*digitalRead(6)+ 16*digitalRead(7)+ 8*digitalRead(8)+ 4*digitalRead(9)+ 2*digitalRead(10)+ digitalRead(11);
     Serial.print(myByte);
     myStatus=0;
  
   }
  
 }:
 
Which of the following best describe the above sketch?
Answer A. It is an attempt of synchronous (commanded over the falling edge of a clock) binary to decimal conversion. The Arduino reads a full byte from 8 digital inputs, converts it into an unsigned int then the result is sent over the serial port
B. The machine can be used to convert binary data (sent from the host computer via serial port) into ASCII characters
C. It is an attempt of asynchronous binary to hexadecimal conversion. The Arduino reads a full byte from 8 digital inputs, converts it and then the result is sent  over the serial port. Availability of a result is signaled by the rising edge of a
 1/Consider the following Arduino sketch 
 int myByte=0;
 int myStatus=0;
 
void myClock(){
   while (digitalRead(0)) {
   myStatus=0;}
   myStatus=1; //falling edge detected
 }
 void setup()
 { pinMode(0,INPUT);
   pinMode(1,OUTPUT);
   pinMode(3,OUTPUT);
   pinMode(4,INPUT);
   pinMode(5,INPUT);
   pinMode(6,INPUT);
   pinMode(7,INPUT);
   pinMode(8,INPUT);
   pinMode(9,INPUT);
   pinMode(10,INPUT);
   pinMode(11,INPUT);
   Serial.begin(9600);
   Serial.println("I am ready!");
 
 }
 
void loop()
 {
   myClock();
  
   while (myStatus)
   {
     myByte=128*digitalRead(4) + 64*digitalRead(5) + 32*digitalRead(6)+ 16*digitalRead(7)+ 8*digitalRead(8)+ 4*digitalRead(9)+ 2*digitalRead(10)+ digitalRead(11);
     Serial.print(myByte);
     myStatus=0;
  
   }
  
 }:
 
Which of the following best describe the above sketch?
 1/Consider the following Arduino sketch 
 int myByte=0;
 int myStatus=0;
 
void myClock(){
   while (digitalRead(0)) {
   myStatus=0;}
   myStatus=1; //falling edge detected
 }
 void setup()
 { pinMode(0,INPUT);
   pinMode(1,OUTPUT);
   pinMode(3,OUTPUT);
   pinMode(4,INPUT);
   pinMode(5,INPUT);
   pinMode(6,INPUT);
   pinMode(7,INPUT);
   pinMode(8,INPUT);
   pinMode(9,INPUT);
   pinMode(10,INPUT);
   pinMode(11,INPUT);
   Serial.begin(9600);
   Serial.println("I am ready!");
 
 }
 
void loop()
 {
   myClock();
  
   while (myStatus)
   {
     myByte=128*digitalRead(4) + 64*digitalRead(5) + 32*digitalRead(6)+ 16*digitalRead(7)+ 8*digitalRead(8)+ 4*digitalRead(9)+ 2*digitalRead(10)+ digitalRead(11);
     Serial.print(myByte);
     myStatus=0;
  
   }
  
 }:
 
Which of the following best describe the above sketch?
 1/Consider the following Arduino sketch 
 int myByte=0;
 int myStatus=0;
 
void myClock(){
   while (digitalRead(0)) {
   myStatus=0;}
   myStatus=1; //falling edge detected
 }
 void setup()
 { pinMode(0,INPUT);
   pinMode(1,OUTPUT);
   pinMode(3,OUTPUT);
   pinMode(4,INPUT);
   pinMode(5,INPUT);
   pinMode(6,INPUT);
   pinMode(7,INPUT);
   pinMode(8,INPUT);
   pinMode(9,INPUT);
   pinMode(10,INPUT);
   pinMode(11,INPUT);
   Serial.begin(9600);
   Serial.println("I am ready!");
 
 }
 
void loop()
 {
   myClock();
  
   while (myStatus)
   {
     myByte=128*digitalRead(4) + 64*digitalRead(5) + 32*digitalRead(6)+ 16*digitalRead(7)+ 8*digitalRead(8)+ 4*digitalRead(9)+ 2*digitalRead(10)+ digitalRead(11);
     Serial.print(myByte);
     myStatus=0;
  
   }
  
 }:
 
Which of the following best describe the above sketch?
It is an attempt of synchronous (commanded over the falling edge of a clock) binary to decimal conversion. The Arduino reads a full byte from 8 digital inputs, converts it into an unsigned int then the result is sent over the serial port
It is an attempt of synchronous (commanded over the falling edge of a clock) binary to decimal conversion. The Arduino reads a full byte from 8 digital inputs, converts it into an unsigned int then the result is sent over the serial port
The machine can be used to convert binary data (sent from the host computer via serial port) into ASCII characters
The machine can be used to convert binary data (sent from the host computer via serial port) into ASCII characters
It is an attempt of asynchronous binary to hexadecimal conversion. The Arduino reads a full byte from 8 digital inputs, converts it and then the result is sent  over the serial port. Availability of a result is signaled by the rising edge of a It is an attempt of asynchronous binary to hexadecimal conversion. The Arduino reads a full byte from 8 digital inputs, converts it and then the result is sent  over the serial port. Availability of a result is signaled by the rising edge of a A. It is an attempt of synchronous (commanded over the falling edge of a clock) binary to decimal conversion. The Arduino reads a full byte from 8 digital inputs, converts it into an unsigned int then the result is sent over the serial port
B. The machine can be used to convert binary data (sent from the host computer via serial port) into ASCII characters
C. It is an attempt of asynchronous binary to hexadecimal conversion. The Arduino reads a full byte from 8 digital inputs, converts it and then the result is sent  over the serial port. Availability of a result is signaled by the rising edge of a

Explanation / Answer

A)it is an attempt of synchronous (commanded over the falling edge of a clock) binary to decimal conversion. The Arduino reads a full byte from 8 digital inputs, converts it into an unsigned int then the result is sent over the serial port

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote