I am new to arduino and BLE, but would like to make a robot vehicle using an Arduino R4 WiFi, controlled by an iPad over BLE.
Is this even possible? Or is there a better way?
After reading the documentation, I think that the ipad would be the peripheral, making the desired wheel speeds available as Characteristics, and the arduino would read these values ad drive the motors accordingly. Is that the best way?
Any recommendations on what software to use to create the iPad app? Or any good BLE Peripheral simulation iPad app? (I don't have a Mac for iPad development)
Is there a good example of how to do this? Or even just a side-by-side explanation of the Central and Peripheral bluetooth commands?
Is there an iPad or Android Ap that would act like a BLE Peripheral that I can use for testing my Arduino code?
There may be a much easier way to do this, so please feel free to point out the obvious!
Unless you have a Mac, you cannot create an iOS app. However, you can create Android apps.
One solution is to use the MIT App Inventor to create the Android app. Here is a link to a YouTube video that does this for an ESP32. You may be able to adapt this for the Uno R4 WIFI.
I have created a library that allows one to control an Uno R4 WIFI over ble using Python scripts.
The Uno is a peripheral, and the Python script is a central. The two communicate using the BLE UART service. This creates a virtual serial link between the two.
I hope that this may point you in the right direction. If you have any questions about my library, I would be glad to answer.
I have played with App Inventor but am not an expert on it. However, it is pretty straightforward.
First, let me explain how Telemetrix works. It consists of a "fixed" server sketch that listens for commands across the link and generates reports for data changes to be sent to the Python client. So, the Arduino is only programmed once, and the application is created using the Python API.
To try it out, first load the library using the Arduino IDE. Next, go to examples and select Telemetrix4UnoR4/WIFI/Telemetrix4UnoR4BLE.
The source for the sketch may be found here. There is a lot of code, so if you have any questions, please ask.
On the PC side of things, to install the client software, go through the steps in this and the following few sections of the User's Guide.