I make an application in order to connect my arduino to my phone and try to display some data from the accelerometer (arduino 33 ble sense) but when i click on "Scan" nothing is happening...app inventor.pdf (210.2 KB)
the numbers 0x180C is what is display on nrf connect when i connect my device
Phone:
... Ensure that Bluetooth is switched on, Fine Location is switched on.
What is the make and model of the phone?
What is the Bluetooth version of the phone?
What is the Bluetooth version of your Nano - I can't find it in the tech specs.
This is a bit alarming:
The HTS221 humidity and temperature sensor: Due to self-heating, when the board is powered by USB, the HTS221 becomes unreliable and shows an offset in each reading that changes with the external temperature. To obtain reliable measurements, the board shall be powered by the 3v3 pin, this could be done by cutting the +3V3 solder jumper on the bottom and powering the board through the VIN pin.
Your A40 supports Bluetooth 5.0. I was hoping you would find the BT spec for the Nano either on the chip itself or in the instructions it came with........
You can see the version date of the BLE extension in the Extension box of App Inventor. Click on the tiny question mark. The most recent version is 20200828
When you post in your Topic in reply to someone, make sure you do that via the (gray) reply button under their post - that way a notification is received which means they may get back to you more quickly
Modify your BytesReceived Block as per my earlier post. You probably need to give the scan a bit of time to find devices (one you have the Nano's address, you can change your code to use it directly without scanning).
Here is a sample Project that shows how to give the scan time to complete: BLE_BASIC_SEND_TEXT.aia (195.6 KB)
I make it by myself with some search on Internet.On my app, I want to display the power of a boxer when he hit the punching bag thanks to the acceleration of my nano
The main issue in the Sketch is all the Serial Print stuff. Since you are only using one Serial Channel, that data can only go to one device. You certainly don't want anything other than the sensor values going to your App, so either add a software Serial to maintain two channels (one to your App, one to the Arduino Serial Monitor) or simply comment out all the Serial lines except the ones sending the sensor value.
I'm not sure about your Service and Characteristic UUIDs - did they arrive as default values for the Nano?
Where abouts on the punch bag is the Nano going to be?
Concerning the Blocks, incorporate the change I have shown in my earlier post, and work out for yourself how to use the scan Clock Timer Blocks of my example Project in your Project.
I just take it from nRf connect ... I just want to be able of pairing my phone to the nano without connect it to my computer or an app like nRf connect (i want my own app )
at the bottom of the punching bag
yes but i am a beginner on arduino. Can you just say to me where are the mistakes ?
Actually - just realised this punch bag Project has been done before. One of the issues was data streaming. Have you measured (timed) how quickly your boxers are hitting the punch bag? Or is it just a single punch to measure?
the goal here is to mesurate all of the punchs he give on the punch bag but just know with the acceleration the "power" of each punch (F= weight of the bag x acceleration ) (maybe with a lign in the arduino code) ...
thanks a lot for your help