bluetooth HC-05


35 ₪

الناشر: متجر القطع الالكترونية

القسم: مرسلات ومستقبلات

تاريخ النشر: 2020-11-28



Start Building

The circuit is so simple and small, there are only a few connections to be made Arduino Pins Bluetooth Pins RX (Pin 2) ———-> TX TX (Pin 3) ———-> RX 5V ———-> VCC GND ———-> GND Connect a LED negative to GND of Arduino and positive to pin 13 with a resistance valued between 220Ω – 1KΩ. And you\'re done with the circuit





arduio code

code
نسخ
اقتباس
عرض
تنزيل
	
								
#include <SoftwareSerial.h> SoftwareSerial MyBlue(2, 3); // RX | TX int flag = 0; int LED = 8; void setup() { Serial.begin(9600); MyBlue.begin(9600); pinMode(LED, OUTPUT); Serial.println("Ready to connect\nDefualt password is 1234 or 000"); } void loop() { if (MyBlue.available()) flag = MyBlue.read(); if (flag == 1) { digitalWrite(LED, HIGH); Serial.println("LED On"); MyBlue.println('red'); } else if (flag == 0) { digitalWrite(LED, HIGH); Serial.println("LED Off"); } }


سلة المشتريات افراغ السلة