Subject: Request for Assistance – Accessibility App Project with MIT App Inventor (App Inventor controlled electric wheel chair)

Dear Hasan, as far as I can read you've already done a great job on Arduino.
So what you'll need to do is to add (integrate) my BT code to yours.

Just a little comment: I believe that your wheel circumference is 1.30 meters (and not cm :rofl:).

Since you talk about speed and Kilometers, this means that are you using your wheelchair outside ? on streets ? Please be careful !!! If you were here in Italy you should write down your will (to leave your inheritage :fearful:!) before going through roads....

Anyway, though I could respond with some delay, please do not hesitate to write me at any time.
Buona serata.
Ciao, ugo.

1 Like

Dear Ugo,

First of all, thank you very much for your kind words. I’ve made real progress on the Arduino side — and that’s largely thanks to your support. I’ll integrate your BT code into mine, and now I feel more confident doing that.

As for the wheel circumference — yes, let’s call it a little "unit error" :sweat_smile:
It’s actually 1.30 meters, but in my excitement I wrote “cm”. If I were in Italy, I’d probably have to write my will before even heading out the door! :smile:

Jokes aside, I do plan to use my system outdoors, so safety and reliability are top priorities for me. Every piece of advice you give is truly valuable.

Even if your replies come with some delay, I always wait patiently and gratefully.
Thank you again — have a great evening!

Warm regards,
Hasan

Absolutely true: we are the birthsite of Ferrari, Maserati, Lamborghini, Ducati....and much more.... :rofl: :rofl: :rofl:

Jokes aside, I do plan to use my system outdoors, so safety and reliability are top priorities for me. Every piece of advice you give is truly valuable

When you'll feel comfortable and confident with the app, and you'll want to implement the joystick on the phone, it will become mandatory to make absolutely "strong" the communication and to implement an immediate safe-stop-wheels algorithm.
But this is another story.
Buonanotte !

1 Like

Dear Ugo,

Thanks to you, I first started to love Italians... and then Arduino. :blush:
Your support really makes a difference.

Warm regards,
Hasan

Dear Hasan,
any news ? Have you received the new HC05 ?
If yes, nd before trying to test my last .aia and Arduino, please check with your Android level if it is necessary to add the blocks relevant to the permission requests, such as:
image

Best wishes,
Ugo.

1 Like

Dear Ugo,

I’ve finally solved the Bluetooth issue — thanks to a little tea and a lot of persistence :coffee::slightly_smiling_face:
When the HC-05 module arrived, I made myself comfortable and got to work.

The module is now working in SLAVE mode.
The default PIN "1234" is gone — our new code is: 1291
MAC address: 98:D3:11:FD:5C:98
This address is hardcoded into the App Inventor project.
So now, when the app launches, the module connects automatically — no PIN prompts.


:electric_plug: Arduino connections are as follows:

  • D2 → TX (HC-05)
  • D3 → RX
  • A3 → Battery voltage measurement
  • D8 → Hall sensor (for distance / kilometers)
  • Baud rate: 9600

:battery: Battery Voltage Reading:

Battery voltage is read from pin A3.
To scale the voltage down to 0–5V for Arduino, I used a voltage divider with two resistors.


:magnet: Hall Sensor for Kilometers:

The Hall sensor is connected to pin D8, triggered via interrupt.
In code, I use:

cpp

KopyalaDüzenle

attachInterrupt(digitalPinToInterrupt(8), countPulse, RISING);

:straight_ruler: Wheel Info:

  • Wheel diameter: 41 cm
  • Which gives us a circumference of approximately 129 cm
    That means each Hall pulse equals 1.29 meters of movement.

So:

ini

KopyalaDüzenle

KM = (pulseCount × 1.29) / 1000

:outbox_tray: Serial Output from Arduino:

Data is sent as:

yaml

KopyalaDüzenle

AKU: 24.7; HIZ: 3.2; KM: 12.1

This line is received by the phone and displayed —
but only inside Label1 as a single string.

I wasn't able to split the values into Label_Aku, Label_Hiz, and Label_KM.


:speech_balloon: And finally...

I managed the Bluetooth side, dear Ugo.
But I failed when it came to parsing the data and displaying it in the correct fields.

I see the data in Serial Monitor — clean and correct —
but I couldn't make the visual gauges work properly.

Honestly, I'm a bit embarrassed to keep bothering you…
Because every time, you respond with patience, precision, and kindness.

But there's truly no one else I trust like you.

Everything you touch works better — and once again, I'm hoping for your magic.


:pray: My humble request:

If you ever find a little spare time...
Could you please create a working .aia file as an example?

One that automatically connects via Bluetooth, receives the full line of data,
and correctly displays the values on separate gauges or labels?

Such a file would guide me for both the App Inventor side and Arduino side.


Thank you so much for everything, Ugo.
Your guidance is still present in every step we take.
We raise our tea cups to you :tea:

With great respect and gratitude,
– Hasan Acar

Dear Hasan, so it seems that we are close to the target, but we haven't finished yet!
To allow the app to split correctly the received data, your Arduino code shall send a unique string with the $$$ header and only the three values, without any title, nor blanks, and just semicolons as separator.
Something like

DataFrame = "$$$";
DataFrame = DataFrame + ";" + String(Odometer,1) + ";" + String(Speed,1) + ";" + String(Battery,1);
BTSerial.println(Dataframe);

At that point the app shall receive the whole string until it reaches the CR generated by the .println(),
The block
image

separates the received string in 4 elements, the first one being the $$$ (which we can consider just as a header), then the second element is the KM, the third is the Speed, and the fourth is the battery level (or any different sequence, but according to the string composition in Arduino).
Please take again a look to the couple of files I've sent in my previous post: you should recognize the splitting block, the loading of the splitted elements into the gauges (I use buttons instead of labels so I can load as background image in the buttons, the dark green simulated display with chromed frame.
Since on my environment the 2 files I've sent you are working fine, instead of sending them again to you, would you please send me yours, so I can take a look to them and then try them on my desk so to see what happens ? (but not tonite :sleeping: )
Ciao, ugo.

1 Like

Dear Ugo,

Thanks to your guidance and support, we’ve managed to make almost everything work!

:small_blue_diamond: Bluetooth connection is stable
:small_blue_diamond: Arduino is sending correct data
:small_blue_diamond: The phone receives battery voltage, speed, and odometer readings
:small_blue_diamond: Data splitting works perfectly
:small_blue_diamond: We now display battery and odometer values on the small digital indicators

We only have one last request:

:point_right: We’d love to show the real-time speed on the big central digital display, instead of the odometer. Right now, the big display still shows total KM.

Everything else works like a charm, and it’s all thanks to you!

Honestly, I already had great respect for Italians, but after working with you, I admire you even more. Your help is truly priceless.
You also helped me connect with Arduino on a deeper level, and for that, I’m deeply grateful :pray:

I’m attaching the latest .aia project file for you to check — whenever you find the time.
Please don’t feel pressured. Take a look only if and when you’re free — we don’t want to bother you at all!

Thank you again, Ugo!
With all my respect and warmest regards,
Hasan
BT_Chair_Commander_HIZ_ORTA_FIXED3.aia (1.8 MB)

Dear Hasan, merhaba ! (I hope it's correct :-))
I'll have a look tomorrow (Sat) but I'm far from my desk ''till Mon evening, so I will not be able to test it until that date.
Anyway, I'll send you a trial copy by tomorrow, or Sunday at last.
Have a great WE.
Ciao,Ugo.

PS honestly the 99% has been done by yourself, I've just given you a few hints

1 Like

Dear Ugo,

There is absolutely no rush — you can check it whenever you have time.
I'm truly very, very grateful for all your help, guidance, and patience.
Thanks to you, I really warmed up to this project, learned so much, and I'm working on it with growing excitement every day.
Without your support, I wouldn’t have come this far.

Wishing you a great weekend — we can continue whenever it suits you best.
I’m always here and ready.

Ciao, with kind regards
– Hasan

1 Like