รหัสสินค้า | M3028 |
หมวดหมู่ | Bluetooth, LAN |
ราคา | 60.00 บาท |
น้ำหนัก | 5 กรัม |
สถานะสินค้า | พร้อมส่ง |
ลงสินค้า | 28 ธ.ค. 2562 |
อัพเดทล่าสุด | 18 ก.ค. 2568 |
จำนวน | ชิ้น |
Serial AT instructionSet |
|||||
JDY-33 module serial port Send AT command Be sure to add \r\n |
|||||
Sequence |
Instruction |
Features |
Default |
||
1 |
|
AT |
|
Test |
|
2 |
|
AT+VERSION |
|
Version number |
JDY-33-V1.1 |
3 |
|
AT+STAT |
|
Query connection status |
0 |
4 |
|
AT+SLEEP |
|
Sleep |
- |
5 |
|
AT+BAUD |
|
Baud rate setting and query |
9600 |
6 |
|
AT+NAME |
|
Broadcast name setting and query |
JDY-33-SPP |
7 |
|
AT+NAMB |
|
BLE broadcast name setting query |
JDY-33-BLE |
8 |
|
AT+PIN |
|
Connection password settings and queries |
1234 |
9 |
|
AT+LADDR |
|
Query the MAC address of the module |
|
10 |
|
AT+RESET |
|
Soft reset |
- |
11 |
|
AT+DEFAULT |
|
Reset |
- |
12 |
|
AT+DISC |
|
Disconnected (valid in connection state) |
- |
13 |
|
AT+TYPE |
|
Set the query pairing password switch |
0 |
14 |
|
AT+ENLOG |
|
Serial port status output enable |
1 |
15 |
|
AT+UUIDLEN |
|
Set the length of the query UUID |
0 |
16 |
|
AT+SVRUUID |
|
BLE service UUID setting query |
FFE0 |
17 |
|
AT+CHRUUID |
|
BLE feature UUID setting query |
FFE1 |
18 |
|
AT+CRXUUID |
|
BLE feature UUID setting query |
FFE2 |
#include "SoftwareSerial.h"
SoftwareSerial BTSerial(5, 6); // RX | TX // PIN5 = RX <--- TXD JDY-33 // PIN6 = TX ---> RXD JDY-33
// mobile or PC Disconect bluetooth // Arduino IDE = [ 9600baud ] / [ Both NL &CR] (\r\n)
void setup() { Serial.begin(9600); Serial.println("Enter AT commands:"); BTSerial.begin(9600); // JDY-33 default speed in AT command more } void loop() { // Keep reading from JDY-33 and send to Arduino Serial Monitor if (BTSerial.available()) Serial.write(BTSerial.read()); // Keep reading from Arduino Serial Monitor and send to JDY-33 if (Serial.available()) BTSerial.write(Serial.read()); }
/* -- XY_NANO_4CH -- This source code of graphical user interface has been generated automatically by RemoteXY editor. To compile this code using RemoteXY library 2.4.3 or later version download by link http://remotexy.com/en/library/ To connect using RemoteXY mobile app by link http://remotexy.com/en/download/ - for ANDROID 4.3.1 or later version; - for iOS 1.3.5 or later version; This source code is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. */ ////////////////////////////////////////////// // RemoteXY include library // ////////////////////////////////////////////// // RemoteXY select connection mode and include library #define REMOTEXY_MODE__SOFTSERIAL*
#include "SoftwareSerial.h" #include "RemoteXY.h"
// RemoteXY connection settings #define REMOTEXY_SERIAL_RX 5 // --> TXD Bluetooth #define REMOTEXY_SERIAL_TX 6 // --> RXD Bluetooth #define REMOTEXY_SERIAL_SPEED 9600 // RemoteXY configurate #pragma pack(push, 1) uint8_t RemoteXY_CONF[] = { 255,4,0,0,0,94,0,8,13,1, 2,0,6,22,48,13,2,26,31,31, 79,78,49,0,79,70,70,0,2,1, 7,39,47,13,133,26,31,31,79,78, 50,0,79,70,70,0,2,0,8,56, 45,14,205,26,31,31,79,78,51,0, 79,70,70,0,2,0,7,75,45,14, 1,26,31,31,79,78,52,0,79,70, 70,0,129,0,4,8,57,9,6,79, 78,47,79,70,70,32,52,67,72,46, 0 }; // this structure defines all the variables of your control interface struct { // input variable uint8_t SW1; // =1 if switch ON and =0 if OFF uint8_t SW2; // =1 if switch ON and =0 if OFF uint8_t SW3; // =1 if switch ON and =0 if OFF uint8_t SW4; // =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_SW1 7 #define PIN_SW2 8 #define PIN_SW3 9 #define PIN_SW4 10 void setup() { RemoteXY_Init (); pinMode (PIN_SW1, OUTPUT); pinMode (PIN_SW2, OUTPUT); pinMode (PIN_SW3, OUTPUT); pinMode (PIN_SW4, OUTPUT); // TODO you setup code } #define RELAY_TRIG 0 void loop() { RemoteXY_Handler (); #if RELAY_TRIG == 1 digitalWrite(PIN_SW1, (RemoteXY.SW1==0)?LOW:HIGH); digitalWrite(PIN_SW2, (RemoteXY.SW2==0)?LOW:HIGH); digitalWrite(PIN_SW3, (RemoteXY.SW3==0)?LOW:HIGH); digitalWrite(PIN_SW4, (RemoteXY.SW4==0)?LOW:HIGH); #endif #if RELAY_TRIG == 0 digitalWrite(PIN_SW1, (RemoteXY.SW1==0)?HIGH:LOW); digitalWrite(PIN_SW2, (RemoteXY.SW2==0)?HIGH:LOW); digitalWrite(PIN_SW3, (RemoteXY.SW3==0)?HIGH:LOW); digitalWrite(PIN_SW4, (RemoteXY.SW4==0)?HIGH:LOW); #endif // TODO you loop code // use the RemoteXY structure for data transfer }
หน้าที่เข้าชม | 5,168,788 ครั้ง |
ผู้ชมทั้งหมด | 1,568,128 ครั้ง |
ร้านค้าอัพเดท | 10 ก.ย. 2568 |