Skip to content

Instantly share code, notes, and snippets.

@timlambrecht
Last active April 25, 2019 06:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timlambrecht/644cf456d7313ca97fe737e78ed2b4db to your computer and use it in GitHub Desktop.
Save timlambrecht/644cf456d7313ca97fe737e78ed2b4db to your computer and use it in GitHub Desktop.
Code for dc motors
#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