4

Serial does not transmit data as one bunch, but byte by byte. There can easily be some little delays introduced, especially, when transmitted via a packaged protocol like bluetooth, long enough, for the Arduino to not see any new data in its buffer. Also the transmission needs some time, depending on the baudrate. When you read faster from the buffer, than ...


3

I had the exact same problem and got it to work doing these changes: I had to add this under my library include statements #ifndef D5 #if defined(ESP8266) #define D5 (14) #define D6 (12) #define D7 (13) #define D8 (15) #define TX (1) #endif #endif and changed SoftwareSerial BTserial(3, 1); // RX, TX to SoftwareSerial BTserial(D5,D6); I used D5 and D6 on my ...


3

It is still possible to get work. I see the copper pads have been pulled off so you need to use extra amount of solder and hopefully it attaches to the remained copper wire. My case is even worse because the antenna is lost, so I have to remade one. And it works.😂


3

The problem that I see in the photo is that the pads from the PCB are pulled off and attached to the antenna. So now there is nothing to solder the antenna back to. While it's possible to rework this with some solder rework tools, I suspect you don't have those. There is really not much else you can do but replace the Nano with a new one. You should still ...


2

The issue is fixed. Note: This is the version includes Serial1 rather than SoftwareSerial. The rest is the same. Serial.read() Returns the first byte of incoming serial data available. So, when I send AT command from terminal, it does send "A" and then "T" rather than "AT" as a string which Bluetooth expects as stated in the ...


2

The TX signal coming from either the Arduino or HC-05 should be connected to the RX of the other as I understand it, because both are labeled from the perspective of their respective chips Like @timemage already said, I connected TX with TX and RX with RX but this is wrong. The solution was to plug TX (Arduino) with RX (HC-05) and RX (Arduino) with TX (HC-...


2

You have seen contradictory statements, because there are many variables here, that might be different for each of the tutorials. some connect the RX and TX pins in reverse to the Arduino, some don't, some specify other pins on the board There are basically 2 ways to communicate between the Serial Monitor and the HC-05: You can connect the HC-05 directly ...


1

You can find the answer in the Bluetooth connection to HC-05 paired but not connected Step; 1.Once you have paired the HC-05 as you've described, bind the device by entering; sudo rfcomm bind 0 "MAC address" 1 2.To trigger the connection & display the data using minicom, run; sudo minicom -D /dev/rfcomm0 You'll notice that port /dev/rfcomm0 ...


1

In case someone else asks the same question in the future, here's the answer... Technically speaking, the Arduino cannot be hacked for the simple reason that it doesn't have an Operating System like other devices such as the Raspberry Pi, BeagleBone, Rock64 etc. So in as much as someone might be able to bruteforce the HC-05 pin and get access, there's pretty ...


1

I don't know what the time.sleep(4) statement fixes, but you could try moving the to the top of the loop instead of the bottom, so it precedes the first read. At the bottom of the loop, it's first execution comes after the first read.


1

You might want to try sending the data in a packet delimited by unique characters, e.g. { and }, similar to the JSON format. The NMEA GPS standard uses $ and '\n' to delimit messages. Here is an Arduino non-blocking C++ algorithm which builds upon Majenko's readline() example to read a packet. It returns true when incoming data has been accumulated into a ...


1

You will save yourself a lot of headaches by sending the data in ASCII instead of binary: bluetoothSerial.print("RMSCurrent: "); bluetoothSerial.println(RMSCurrent); Of course, you will then have to parse the data stream on the Python side. If you really want to send binary data, then be aware that the write() method you are using is intended for ...


1

Here's the final form of my project. I've added motor detach function since it still shivers a bit. #include <SoftwareSerial.h> #include <Servo.h> const int MPU_addr=0x68; // MPU-6050 I2C address int16_t AcX,AcY,AcZ,GyX,GyY,GyZ; SoftwareSerial BTSerial(3, 2); // TX, RX Servo servoMini; Servo servoUp; Servo servoDown; const byte pinMini = 6; ...


1

I think you want something like Blink Without Delay, but with more tasks. Here is my interpretation of your description which extends Blink Without Delay by adding three more tasks to: read the accelerometer perform "just once" perform "also just once" I've added several Serial.print() statements to give a running commentary on what's ...


1

Update: After trying numerous codes, I was 💯 sure that it wasn’t a software problem. I then removed the Hc05 module from the circuit, and I was able to put it in AT mode(this means my module is working fine). This leaves only one possible problem I.e the circuit. I used a multimeter to measure the voltage between Hc05 RX and GND. I got 1.8v(but how?). After ...


1

IMHO, after reading Majenko and raddevus reply, you may do something to "reduce missing data" reduce baud rate (may be 9600), give more time for bluetooth data transfer. add a checksum byte for your data. Rererence : https://lucidar.me/en/serialib/most-used-baud-rates-table/


1

Your main problem is, that you are using many blocking calls, especially delay(). During that the Arduino cannot do anything else. You need to use a non-blocking coding style, doing multiple things one after another in fast succession. Here the style from the BlinkWithoutDelay example using millis() is very useful. There are lots of tutorials about that ...


1

Nothing wrong with your code, I've the exact same issue as you have. It bothers me whole week long and fortunately, we (along with my colleague) accidentally figured that was caused by Windows 10, weird right? We don't believe it at very beginning either, but after several back-N-forth testing, it just like that. When we upload exact same code from another ...


1

Nevermind, I figured it out. For anyone that has this problem to: First, use the "blueart_cmdmode" example file. Then, follow these steps: HOW TO GET THE SEEEDUINO XIAO TO WORK WITH THIS Make sure the "Adafruit_BluefruitLE_UART ble(Serial1, BLUEFRUIT_UART_MODE_PIN);" line of text above the "void error" line is UNCOMMENTED. ...


1

if you are using an Arduino, I recommend you to use the BPlib, it's a free arduino library that contains functions that are similar to the Keyboard.h. The following link is from the Arduino website: https://www.arduino.cc/reference/en/libraries/bplib/ When you download the Lib, take a look at the examples given by the creator of the Library, all the example ...


1

Can I send any kind of signal to my phone with Bluetooth? You have an HC-06, which is a bluetooth Serial (UART) bridge. Thus the bluetooth device exposes the profile for a serial terminal. You can only transmit serial data. It doesn't work for HID input to the smatphone or audio. The Bluecontrol app seems to use serial. So that is not a problem. To get the ...


1

So, I got carried away with my exams and I forgot to come back with an update and a solution. To take it short, I added a new source of power to the circuit and I am only turning the servo on when needed to rotate, then turn it off again. The code can be seen below: #include <Servo.h> #include <SoftwareSerial.h> int rxPin = 2; int txPin = 3; int ...


1

For completeness, it appears an appropriate Python library can be installed with: pip3 install adafruit-circuitpython-ble The test code, used with the Arduino code 'Echo' from the ArduinoHardwareBLE library is below. This was updated to let you choose the name of the device (here, MY_BLE) rather than any random device that has UART capability. It also ...


1

decoded backtrace in your question is missing, one of the choices to see stack trace is https://github.com/littleyoda/EspStackTraceDecoder i dont know exactly if this is your case or not, but calling esp_ble_gap_stop_scanning() before esp_bluedroid_deinit() possibly avoids your crash.


1

There is an issue with the way in which the data is sent and received because it assumes the transmission will remain perfectly synchronised for the lifetime of the programme. Consider what would happen if one byte were to be dropped due to a communication error – the x and y data would be swapped for further transmissions. Original Sender void loop() { // ...


1

The code seems to have a few missing lines for logic. Here's a corrected version from my understanding. #include <NewPing.h> #include<Servo.h> #define TRIGGER_PIN A1 #define ECHO_PIN A0 #define MAX_DISTANCE 300 #define IR A2 NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); Servo myservo; String voice; void setup() { Serial.begin(9600); ...


1

Well, after a lot of research, it seems that my main problem was that I´m receiving and sending information at the same time. And with the library Softwareserial, only 1 can be active at the same time. I found two solutions, but to be honest I'm not complete satisfy with neither of them. However, for my application will work. The first solution: Is to used ...


1

I think this is the problem on the hardware setting. It should be: Arduino | HC-08 VCC - VCC GND - GND 14RX3 - TXD 15TX3 - RXD Variable declare: SoftwareSerial hc08(14,15) // RX pin, TX pin;


1

In the Arduino IDE you should select "No Line Ending" from the menu, instead of "New line". Otherwise you are sending an extra "\n".


1

This seems more like an overflow issue with something than an actual delay. If you look at the time in the log, it seems you aren't skipping seconds in the log (aka, 19:12:32.234 in two sequential log entries when you claim a delay). I think it's an error of working with larger than 8-bit data sizes. I know this is an old question, but I was looking for ...


Only top voted, non community-wiki answers of a minimum length are eligible