Arduino_Arvalis
10. Μέτρηση απόστασης ultrasonic + buzzer
// this constant won’t change. It’s the pin number of the sensor’s output: const int pingPin = 7; int const buzzPin = 2; void setup() { // initialize serial communication: Serial.begin(9600); pinMode(buzzPin, OUTPUT); // buzz pin is output to control buzzering } void loop() { // establish variables for duration Διαβάστε περισσότερα…