Last active
December 5, 2022 00:48
-
-
Save sebadima/cf418c42cd9f90387c242b468ea3af1c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Driver per motore elettrico brushed | |
- pin 9 di Arduino collegato alla base del TIP120 | |
*/ | |
int pinMotorino = 9; | |
void setup() { | |
Serial.begin(9600); | |
pinMode(pinMotorino, OUTPUT); | |
} | |
void loop() { | |
Serial.print("LOOP\n"); | |
// accelerazione progressiva del motore | |
for(int x = 0; x <= 255; x++) | |
analogWrite(pinMotorino, x); delay(10); | |
delay(10); | |
} | |
delay(1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment