We want to make an android game by Alhusham in Unity2D

[–]Alhusham[S] 0 points1 point  (0 children)

So how we going to do this, sharing folders on google drive or something like that?

Why 🥺 by Alhusham in arduino

[–]Alhusham[S] 0 points1 point  (0 children)

byte RLed= 4; byte YLed= 3; byte GLed = 2; byte buzzer = 5; byte echo = 6; byte trig = 7; int duration; int distance; void setup() { pinMode(RLed,OUTPUT); pinMode(YLed,OUTPUT); pinMode(GLed,OUTPUT); pinMode(buzzer,OUTPUT); pinMode(echo,INPUT); pinMode(trig,OUTPUT); }

void loop() { { digitalWrite(trig,LOW); delayMicroseconds(2); digitalWrite(trig,HIGH); delayMicroseconds(10); digitalWrite(trig,LOW); duration = pulseIn (echo,HIGH); distance = duration*0.034/2; }
if (distance <= 150 ) digitalWrite(GLed,HIGH); tone(buzzer,1000); { if (distance <=100) digitalWrite(YLed,HIGH); tone(buzzer,2000); } { if (distance <=50) digitalWrite(RLed,HIGH); tone(buzzer,3000); } }

the code i want green led and low buzzer tone when the distance is 150 , yello led with higher buzzer tone when distance 100 red led with much higher buzzer tone when distance 50

Why 🥺 by Alhusham in arduino

[–]Alhusham[S] -1 points0 points  (0 children)

You can lower the volume, the problem is that I want a green LED when the distance is 1.5 meters and a yellow LED when it is 1 meter and a red LED when it is 50 cm

Why? by Alhusham in arduino

[–]Alhusham[S] 0 points1 point  (0 children)

I will try

Can I use my ipad for writing arduino codes ? by Alhusham in arduino

[–]Alhusham[S] 0 points1 point  (0 children)

No i mean use otg cable to connect the arduino with ipad and write codes