![]() #include // Add Adafruit Motor Shield for Arduino kit library. 12Servo SER1 // Create Servo object to control Servo. 11AF_DCMotor M2 ( 2, MOTOR12_64KHZ ) // Create DCMotor #2 using M2 output, Set to 64kHz PWM frequency. 10AF_DCMotor M1 ( 1, MOTOR12_64KHZ ) // Create DCMotor #1 using M1 output, Set to 64kHz PWM frequency. 9#define DCMROFF 25 // This sets Offset to allow differences between the two DC traction Motors. 8#define LEDRPIN A5 // Assign PIN A5 as LEDRPIN (Connect Arduino UNO "A5" PIN with RGB Diffused Common Cathode "LEDR" PIN). 7#define LEDGPIN A4 // Assign PIN A4 as LEDGPIN (Connect Arduino UNO "A4" PIN with RGB Diffused Common Cathode "LEDG" PIN). ![]() ![]() 6#define LEDBPIN A3 // Assign PIN A3 as LEDBPIN (Connect Arduino UNO "A3" PIN with RGB Diffused Common Cathode "LEDB" PIN). 5#define EchoPIN A2 // Assign PIN A2 as EchoPIN (Connect Arduino UNO "A2" PIN with Ultrasonic Sonar Sensor "Trig" PIN). 4#define TrigPIN A1 // Assign PIN A1 as TrigPIN (Connect Arduino UNO "A1" PIN with Ultrasonic Sonar Sensor "Trig" PIN). 3#define BuzzPIN A0 // Assign PIN A0 as BuzzPIN (Connect Arduino UNO "A0" PIN with Buzzer "+" PIN). 1#include // Add Adafruit Motor Shield for Arduino kit library.
0 Comments
Leave a Reply. |