This file contains hidden or 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 <stddef.h> | |
| /* | |
| Copyright 2018 Embedded Microprocessor Benchmark Consortium (EEMBC) | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or 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 <Servo.h> | |
| int TRIG_PIN = 13; | |
| int ECHO_PIN = 12; | |
| int MOTOR_PIN1 = 5; | |
| int MOTOR_PIN2 = 6; | |
| int SERVO_PIN = 3; | |
| float SPEED_OF_SOUND = 0.0345; | |
| bool is_backward = false; | |
| unsigned long forward_time; | |
| Servo servo; |