How would I go about sending a "Yes or No" prompt from my Arduino Uno to My Phone?

For my school's science project, I'm current building a mini self-driving car using an Arduino Uno, an HC-SR04 Ultrasonic Sonar Distance Sensor, two IR Receiver Sensors, and a Rain Sensor so I can have "weather detection capabilities" and have the car respond in certain ways to certain phenomena (aka water or moisture on the sensor).

One of the responses I want is for the rain sensor to sense moisture/water, and for it to immediately send a prompt to my phone with the question "Is it raining/snowing/hailing?" with the answers being Yes/No. Pressing "Yes" will cause the other changes to go into effect (slowing down the car and turning on windshield wipers to ensure rider safety in the weather). Pressing No will cause the car to drive as normal.

Is this possible to do? If so, what products do I need to achieve it?

The aim for this forum is to help new members to grow in programming. Designing projects is not what forum does.
You have a job to do for Your school. Forum is not doing it.
Take a look here what forum asks You to supply us with: How to get the best out of this forum - Using Arduino / IDE 1.x - Arduino Forum

You will need to write an app for the phone that takes some sort of signal from the Arduino. If the Ardunio is WiFi capable, then WiFi is the obvious answer.

Here's an example we're working on with a balancing robot.

It's not a trivial task and will involve learning a whole new programming language. Fun stuff if you want to learn. A big task if you're in a hurry.

You might also try some of the Arduino IOT stuff. I don't know how it works, but there is a banner at the top of every page of the forum pushing it.

Click there where it says "Get them (for free) and see if that will do what you need.

How far from the car is the phone, and is it line of sight?

With an Android phone you might be able to use BlueTooth and an HC05 or HC06 module connected to the Arduino Uno on the car.

1 Like

I plan to use the phone within range of the car because we're demonstrating it at the science fair to judges. so about a few inches away.

I have an IPhone SE, would it still be capable of receiving bluetooth signals or will it only work for android?

I would think about if hosting a web page on the robot would solve the problem. It wouldn't matter what kind of phone was involved just so it has a browser app.

2 Likes

The iPhone only has BLE (bluetooth low energy) which is a different protocol than classic Bluetooth and it will not work with an HC05.

You may be able to use a module called an HM10 which is like and HC05 but for BLE and will communicate with an iPhone. I have not used one, but there are plenty postings on the forum where people have used them. I am not familiar with the standard apps for the iPhone which will communicate with the HM10.

1 Like

That's a fantastic idea and probably the easiest one to accomplish.

Can it be done on a Uno?

For my school's science project, I'm current building a mini self-driving car using an Arduino Uno,

The R4 WiFi maybe. But not a regular UNO. You'll have to add an ESP board of some type to act as the modem. But you're going to have to add something to do the communicating no matter which option you choose.

Thanks. I tend to put a server on everything these days since it's so cheap. :grinning:

that does sound easier than making an entire app from scratch, especially because I already have experience with html. do you know what devices i might have to add to make hosting a website possible or is it doable with the base arduino?

if this doesnt work out i might have to scrap the prompt options and just stick to having the rain sensor detect and carry out everything via regular code, but i wanted to implement it to show how real self-driving cars could react to weather changes (and not make changes simply off one moisture detection, like sprinkling or a bird pooping on the top of the car.)

Have you already started building with the Arduino UNO? If you still aren't locked into a board then this sounds like a classic case for the NodeMCU or similar. You can get those pretty cheap now.

In no way endorsing this seller, just the first good example I found searching. You can probably beat this price if you shop around.
https://www.amazon.com/HiLetgo-Internet-Development-Wireless-Micropython/dp/B010O1G1ES

You'd need to add WiFi as a minimum. There are lots of ways to accomplish that depending on how far you are along on the project. Stay tuned, I think you will see lots of suggestions.

Take a look at MIT App Inventor.
There are ways to use Bluetooth and WiFi.

randomnerdtutorials.com has an ebook (not free) that's instructional.

A Bluetooth serial terminal would accomplish much the same thing, but without fancy buttons and such.

Yes I've already built with it, the car chassis is built complete with motors, wheels, a battery pack, and the aforementioned sensors along with the arduino and a breadboard on top. Everything is already connected and I've written code for everything but the rain sensor and this idea im toying with. I have space on the board but it depends on what the node requires and it might be too big for the space i have left

Well that was an option if you didn't already have everything on the UNO. The NodeMCU would replace the UNO in your build. But doing that now would require changes that you don't want to have to make.

Instead look at some of the smaller ESP boards with not many pins. All you really need it for is a modem. People used to use a WiFi shield to serve pages from an UNO so I know it's possible. I'm just betting you can get an ESP of some flavor for a lot less than that shield.

Maybe one of these.

https://www.amazon.com/DIYmall-ESP8266-ESP-01S-Serial-Transceiver/dp/B00O34AGSU/

For a size reference, here's one that's sitting on top of a USB adapter:
https://www.amazon.com/Stemedu-Wireless-Transceiver-Programmer-Downloader/dp/B08QMMGZLB/

@tinkets
You can have a HC-05 bluetooth Module at the Car Side and an Android Phone at the Hand Side. The solution is easy that involves downloading a Bluetooth Terminal from net and installig it in the Android Phone.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.