noooo nooooo by mistake , its hc-05
what should i do now? im helpless
Who assembled the hardware and wrote the Arduino code for you?
claude and chat
They can assemble hardware?
Now I am worried.
Can you post a photo of how the wires are connected to the various pins?
What are you using for a power source?
Has a battery run down?
noo i assembled it , thought u meant the mit code . i cant post a photo but im 100% sure my connections are correct
what do u mean by power source, my laptop , battery is good
What kind of phone are you using to run your apps?
Or are you running an Android emulator?
(trick question)
Here's another straw to grasp.
If you can't receive data from your sketch using a Serial Bluetooth Terminal, try the BLE diagnostic app nrfConnect.
Some HC-05 chips have been reported on this board as running BLE instead of plain old Bluetooth.
How did you connect the arduino ( is it a mega256? ), the bluetooth module and the fsr sensors ( a couple of photos could be helpful, )?
Is the arduino code that on post 42 ( as @ABG said on that code I don’t see any data sent, so no wonder no data is received )?
Sorry @ABG , I'm out on business trip the whole week, but I've seen that also @davidefa in on the matter. He too is a very clever guy on Arduino. I believe he can help in solving. Ciao !
Dear @Lynn1,
I'm afraid that you'll not be in degree to have your code working by tomorrow.
I see so many unknown areas in both your HW and SW (comprising Ardiuno and AI2).
My first hint is to make it the simplest as possible, at the beginning and grow your system step by step.
This means : forget everything about sensors, LCD and other stuff on the Arduino (Mega 2560, I guess, and as also @davidefa has supposed, due to the presence of the Serial1 line in your first post).
Just leave the code necessary to send every 500 ms a constant string like: "Hello world" to the AI2 app.
Don't use the standard delay() function but code your own like:
MyDelay(unsigned long timeout)
{
unsigned long now = millis();
while ((millis()-now) < timeout); // do nothing but leave the CPU alive
}
usage:
MyDelay(500); // waits 500 ms
This hint is due to the fact that some Arduino board types, when using the standard delay() function completely stop the CPU, thus blocking also any communication.
so your loop should look like:
loop{
Serial.println("Hello monitor"); // show on the serial monitor that the loop is working
Serial1.println("Hello world");
MyDelay(500UL);
}
Your setup should look like
setup
{
Serial.begin(9600);
Serial1.begin(9600);
}
And that's all on Arduino SW side.
On the HW side, please be aware that between Mega and the HC05 the Tx and Rx wires must be crossed (Mega Tx on HC05 Rx and visa versa).
BUT: if your HC05 is a "fake" one, as @ABG has already said, and it is a BLE instead, this will be a real nightmare !
To investigate on that, you shall have your simplest Arduino code running and install the SerialBluetoothTerminal (SBT) app on your phone. With its help you will discover if the HC05 is a true one or a fake one (the SBT wil allow you to select which type of counterpart is connected and with that you will discover the type of HC05). But, before doing any attempt of communication, please remember to pair your phone to your HC05 at Operating System level (in Android Settings) .
Last uncertainty is the baudrate between the Mega and the HC05: not all the HC05's are factory set @9600 but sometimes are set to @38400. Let's suppose, for now, that the baudrate is @9600, and cross your fingers.
In a nutshell: until you are not sure that the BT comm's is working properly, any other attempt is a waste of time and of mental resources. Believe me.
Best wishes.
Power from the Laptop via USB? Not likely to be enough for an Arduino. Try using an AC to DC power adaptor, for example an UNO requires 9v to 12V max DC output, 250mA to 1A max current output, 2.1mm diameter plug which is centre pin positive. Given that you are using a lot of sensors plus the nature of the project, you will need at least 500mA.
Interesting re your HC05. Definitely need to find out exactly what it is first.