CPP 267
Adc pwm By Hightechrobo on 8th October 2023 04:58:10 PM
  1. /*
  2. Hightechrobo learn
  3. by Arian
  4. */
  5. #define adcp A0
  6. #define pwmp 3
  7.  
  8. void setup(){
  9.         pinMode(pwmp,OUTPUT);
  10. }
  11. void loop(){
  12.         int i = analogRead(adcp);
  13.         i = (i*255)/1023;
  14.         analogWrite(pwmp,i);
  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.