CPP 224
Najaf 8 Guest on 14th October 2023 08:53:04 AM
  1. #define motor 3
  2. #define pot A0
  3. void setup() {
  4.   pinMode(motor,OUTPUT);
  5.  
  6. }
  7. void loop() {
  8.   int i = analogRead(pot);
  9.   i = (i*255)/1023;
  10.   analogWrite(motor,i);
  11. }

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.