Last active
April 25, 2019 06:38
-
-
Save timlambrecht/644cf456d7313ca97fe737e78ed2b4db to your computer and use it in GitHub Desktop.
Code for dc motors
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
#include "MeOrion.h" | |
MeDCMotor motor1(PORT_1); | |
MeDCMotor motor2(PORT_2); | |
MeDCMotor motor3(M1); | |
MeDCMotor motor4(M2); | |
void setup() | |
{ | |
} | |
void loop() | |
{ | |
motor1.run(100); /* achterwiel links: between 0 and -255 */ | |
motor2.run(100); /* achterwiel rechts: between 0 and -255 */ | |
motor3.run(100); /* voorwiel links: between 0 and 255. */ | |
motor4.run(100); /* voorwiel rechts: between 0 and 255. */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment