/* 6/4/24 Connor Quigley and Reuben Poole code for the sad section of the emotions challenge for our robot. */ #define M2A 17//these lines define the motors forad and backords directions and what there connected to #define M2B 16 #define M1A 19 #define M1B 18 void setup() { // put your setup code here, to run once: pinMode(32, OUTPUT);//sets these pins as outputs for the lights pinMode(33, OUTPUT); pinMode(25, OUTPUT); pinMode(22, OUTPUT); pinMode(1, OUTPUT); pinMode(3, OUTPUT); pinMode(M1A,OUTPUT);//sets the pins for the motors as outputs pinMode(M1B,OUTPUT); pinMode(M2A, OUTPUT); pinMode(M2B, OUTPUT); } void loop() { // put your main code here, to run repeatedly: {//makes the robot turn in circles digitalWrite (M2B, LOW);//stops the weels from moving backwards digitalWrite (M2A, HIGH);//moves that wheel fword digitalWrite (M1B, LOW);//stops tthe wheel from moving backwards digitalWrite (M1A, LOW);//stops this wheel }//separates the lights from the wheels so that they run at the same time and loop { digitalWrite(32, HIGH);//turns on lights connected to these pins blue digitalWrite(22, HIGH); digitalWrite(33, LOW);//turns off all other pins digitalWrite(1, LOW); digitalWrite(25, LOW); digitalWrite(3, LOW); } }