+ 1
Can some one please send me an arduino program which alternates led brightness
ardino
30 Respostas
+ 2
You can use pwm for that.
Call analogWrite(255) on you digital output pwm pin.
The value can be between 0 - 255 which is 0 - 5v.
analogWrite(127) means that the pwm duty cycle is 50% and the output voltage is 2.5V.
int brightness = 255;
int pwm = 6;
void setup {
pinMode(pwm, OUTPUT)
}
void loop {
analogWrite(pwm, brightness);
brightness = brightness - 1;
if(brightness == 0) {
brightness = 255;
}
}
You could also connect a potentiometer to your analog input.
void loop() {
analogWrite(pwm, analogRead(A0));
}
Please note that analogRead() returns a value between 0 and 1023.
+ 1
the outer gate has a Paper, open the gate and move forward then you will See a dor With anet open the net dor- stuff and knock
+ 1
Someone will come (fejiro) no need to say anything
+ 1
she is very nice and hospitable
+ 1
rhonor will take u to fejiro or call fejiro to meet u then u get started . PS the game u promised
+ 1
probably by 3 because i am having lesson (Isolog akute)
+ 1
just come and besides he usually opens the door and I am not coming late and the game
+ 1
i wana to shoo u a game but i don't know how to but i saved the code check my profile
+ 1
(html)
+ 1
kk
+ 1
come I am in Fejiro's š” PS what is your address please
+ 1
hello Ayo y aren't u online
+ 1
y did u start learning sql
+ 1
yes u are online
+ 1
arduino is programmed in cpp
0
thank you
0
Google it loser
0
when I get to fejiros house should I knock and shout fejiro!!!
0
when I knock what will I say
0
was the code you posted in CPP?