Some progress. The interesting bit: Connected: Can Write: false
However, we need to ensure it's not a false negative (a 'red herring'), so can you change the initialization of the variable from 'false' to 'true' and test again?
The Status is telling us that the App values are sent correctly. The Serial Monitor is telling us the values are not received in any shape or form. It seems like there is something very simple missing.......I assume your phone has location switched on?
Hello @ChrisWard and all, (@Juan_Antonio, @Gerriko_io )
sure I'll give it a look, but not today because my friend with his Lancia Fulvia (year 1967) will run the Montecarlo Rally in a few hours and I've prepared for him the "race software" with AI2 interfaced to Hall sensors on wheels (+Arduino Nano+ESP32 + Bluetooth )to compute the speed, and at the same time interfacing the GPS to keep the road.
So we are (very ) busy 'till his departure (approx h 21.00 tonite).
Honestly I've already had a look at this probem, but I don't have a NANO33 BLE. I've just some ESP32 capable of BLE (and an HC08 + UNO in the case). So even if I will be able to make it working, will it be worth for @Muhammad_Zulkifli ? The BLE libraries for NANO33 and ESP32 are hardly different each other.
@Muhammad_Zulkifli in the case, have you the chance to revert your projet on a ESP32 ?
Anyway, sure, tomorrow (Italian time) morning, I'll give it a try.
Ciao ciao.
Regarding the issue of the CanWrite variable being set to false, there are two different types of writes in the BLE spec. CanWriteCharacteristic block corresponds to writes without checking for a confirmation and determines whether you can use the Write family of blocks. Separately, there is the method CanWriteCharacteristicWithResponse that corresponds to whether you can use the Write*WithResponse blocks. By specifying BLEWrite for the characteristic you need to use the latter set of blocks. You can probably also add BLEWriteWithoutResponse flag on the Arduino side to get the intended behavior without having to swap out all of the blocks.
It works sir! ok, now I can proceed to be able to move the linear actuator for my prosthetic hand. And to drive the linear actuator, can we use a list index like the LED we discussed?
Well, I don't know the specification of the hand - only one actuator? That would not need a list in theory, but if you mean the movement is controlled in fixed increments then yes, a list would work for that.
Dear @Muhammad_Zulkifli,
I'm really happy of that. Sorry not having had the time to help you before, but you've seen that @ChrisWard and @ewpatton have had the magic wand to solve your problem.
Best wishes for your project.
Kind regards, Ugo.
Dear @Muhammad_Zulkifli,
as promised (though a bit too late) please find annexed a chunk of code working with the ESP32 (as I told I haven't a NANO33).
The .aia is the same as that of @ChrisWard.
Of course the .ino is intended for an ESP32.
Honestly I've got help from the web. In particular from this link:
This is what you can see on the Serial Monitor when the .ino runs and you hit the buttons on the app:
I've tried to make it as simple as possible, though I'm not an expert on BLE ( ), but the annexed version works fine on my ESP32 and a Lenovo tab M8 on which the app made by Chris runs.
At the end, I hope that this will not cause you any doubts. Just continue with the version that is working with your hardware. Put this version in a drawer, and the next time that you might use an ESP32, you can retrieve it
..... what will the actuators be? Stepper motors? It's a challenge because you have three joints for each finger (two for the thumb) including the knuckles. Lots of research required first.
Anyway, good luck with the Project, sounds exciting!