Answered step by step
Verified Expert Solution
Question
1 Approved Answer
this is my current code and it isn't working. arduino sketch_ANALOG_2_intr int bluePin - 2; int greenPin = 4; int redPin = 6; int buzzerPin
this is my current code and it isn't working.
arduino
sketch_ANALOG_2_intr int bluePin - 2; int greenPin = 4; int redPin = 6; int buzzerPin = 8; void setup( { Il put your setup code here, to run once: Serial.begin(9600); pinMode(bluePin, OUTPUT); pinMode(greenPin, OUTPUT); pinMode(redPin, OUTPUT); pinMode(buzzerPin, OUTPUT); void loop() { 7/ put your main code here, to run repeatedly: int sensorValue = analogRead(AO); float X-sensorValue*(5.0/1023.0); if(X=3 && X-4) { no Tone(buzzerPin); digitalWrite(bluePin, LOW); digitalWrite(greenPin, HIGH); digitalWrite(redPin, LOW: else { tone(buzzerPin, 2000): digitalWrite(bluePin, LOW); digitalWrite(greenPin, LOW); digitalWrite(redPin, HIGH); delay(500); Done compiling Sketch uses 5519 bytes (2%) of program storage space. Maximum is 253952 by Global variables use 218 bytes (2%) of dynamic memory, leaving 7974 bytes Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started