Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup() {
- // put your setup code here, to run once:
- pinMode(12, OUTPUT);
- pinMode(13, OUTPUT);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- frente(180, 1000);
- freio(300);
- re(255, 1000);
- freio(500);
- }
- void frente(int pot, int temp){
- analogWrite(12, pot);
- analogWrite(13, 0);
- delay(temp);
- }
- void freio(int temp){
- analogWrite(12, 0);
- analogWrite(13, 0);
- delay(temp);
- }
- void re(int pot, int temp){
- analogWrite(12, 0);
- analogWrite(13, pot);
- delay(temp);
- }
Add Comment
Please, Sign In to add comment