Guest User

Untitled

a guest
May 27th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. int out = 11;
  2. int V = 0;
  3.  
  4. void setup() {
  5. pinMode(out, OUTPUT);
  6. Serial.begin(9600);
  7. }
  8.  
  9. void loop() {
  10. if( Serial.available() )
  11. V = (Serial.read()-48) * 25; // ASCII abziehen
  12.  
  13. // Spannung einstellen
  14. analogWrite(out, V);
  15. }
Add Comment
Please, Sign In to add comment