Header Ads

Header ADS

Dual Channel Bluetooth Controller | How to Make a Bluetooth Controller

Dual Channel Bluetooth Controller | How to Make a Bluetooth Controller

📌JLCPCB Prototype for $2(Any Color): https://jlcpcb.com

Hello Dear, Welcome to the new blog. In this video tutorial, I will show you How to make a dual channel Bluetooth controller module. This really simple project. I am using dual-channel relay but you can use quad-channel or octal channel relay. I am a simulation circuit diagram from easyeda.com for simulate circuit & design PCB file. for the programming section, I am using the remotexy.com website which is a cool website for automatically generate code. Parts list below. The Parts required for this Project 1. Atmega 328p IC
2. Relay 05Vx2
3. Transistor BC547
4. Resistor 1K x5
5. Resistor 10K x1
6. LED
7. HC05 Bluetooth Sensor
8. IC Base 28 Pin
9. AC Terminal Block 2pin x2
10. AC Terminal Block 3Pin
11. 22pf Capacitor
12. 10uf, 50V Capacitor
13. Female to Male IC Rail
14. 1N4007 Diode
15. 16Mhz Crystal
16. AC Lamp x2

Code:
#define REMOTEXY_MODE__SOFTSERIAL
#include <SoftwareSerial.h>

#include <RemoteXY.h>

// RemoteXY connection settings 
#define REMOTEXY_SERIAL_RX 2
#define REMOTEXY_SERIAL_TX 3
#define REMOTEXY_SERIAL_SPEED 9600


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,2,0,0,0,37,0,10,13,0,
  2,0,21,16,22,11,2,26,31,31,
  79,78,0,79,70,70,0,2,0,52,
  17,22,11,2,26,31,31,79,78,0,
  79,70,70,0 };
  
// this structure defines all the variables and events of your control interface 
struct {

    // input variables
  uint8_t switch_1; // =1 if switch ON and =0 if OFF 
  uint8_t switch_2; // =1 if switch ON and =0 if OFF 

    // other variable
  uint8_t connect_flag;  // =1 if wire connected, else =0 

} RemoteXY;
#pragma pack(pop)

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

#define PIN_SWITCH_1 13
#define PIN_SWITCH_2 12


void setup() 
{
  RemoteXY_Init (); 
  
  pinMode (PIN_SWITCH_1, OUTPUT);
  pinMode (PIN_SWITCH_2, OUTPUT);
  
  // TODO you setup code
  
}

void loop() 

  RemoteXY_Handler ();
  
  digitalWrite(PIN_SWITCH_1, (RemoteXY.switch_1==0)?LOW:HIGH);
  digitalWrite(PIN_SWITCH_2, (RemoteXY.switch_2==0)?LOW:HIGH);
  
  // TODO you loop code
  // use the RemoteXY structure for data transfer
  // do not call delay() 


}

You should download the library file from remotexy.com.




2 comments:

  1. Every day we are getting acquainted with a new tech. Today we are becoming dependent on technology in everything we do in our daily lives.

    ReplyDelete
  2. Among these is free delivery from your Walmart store*. Delivery is usually available same-dayand within an hour window. That means you can run out of coffee after breakfast and get some delivered to your door before you’re hit by the afternoon slump.


    ReplyDelete

Theme images by Bim. Powered by Blogger.