push button


1 ₪

الناشر: ⚡ Electronic Store ⚡

القسم: Button - switch

تاريخ النشر: 2021-10-18




push button to arduino

محتويات

- circuit:

- code:


circuit:



code:

code
نسخ
اقتباس
عرض
تنزيل
	
								
const int buttonPin = 2; long counter = 0; void setup() { Serial.begin(9600); pinMode(buttonPin, INPUT_PULLUP); } void loop() { if (digitalRead(buttonPin) == LOW) { counter++; delay(250); // Debouncing delay } Serial.print("counter: "); Serial.println(counter); }


عرض السلة (تأكيد الشراء) افراغ السلة
اتمام الشراء