Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

convert this code into ardunio assembly code by using asm volatile #define BTN 1 2 #define led 1 8 #define led 2 9 int count

convert this code into ardunio assembly code by using asm volatile #define BTN 12
#define led18
#define led29
int count =0;
int buttonState =0; // variable for reading the pushbutton status
void setup(){
pinMode(BTN, INPUT);
pinMode(led1, OUTPUT);
pinMode(led2,OUTPUT);
}
void loop(){
buttonState = digitalRead(BTN);
if(buttonState==HIGH){
count= count +1 ;
if(count%3==0){
digitalWrite(led1, HIGH);
digitalWrite(led2, LOW);
delay(500);
}
else{
digitalWrite(led1, LOW);
digitalWrite(led2, HIGH);
delay(500);
}
}
}

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