CPP 206
S7 Abdi Guest on 14th October 2023 08:52:08 AM
  1. #define motor 3
  2. int i = 0;
  3. void setup() {
  4.   pinMode(motor,OUTPUT);
  5.  
  6. }
  7.  
  8. void loop() {
  9.   for(i = 0; i <= 255; i++){
  10.     delay(20);
  11.     analogWrite(motor,i);
  12.   }
  13.   if(i == 255){
  14.     analogWrite(motor,255);
  15.   }
  16. }

Hightechrobo bin is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.