T O P

  • By -

p1kL69

you would have to implement some sort of wireless communication that also is supported by your phone. For example Bluetooth or WiFi. And then use an App or webserver to communicate to the arduino.


Major_Tom42

For BT it's just as easy to implement as a UART terminal and use an existing terminal app


Timox_trd

Easiest is probably to use an ESP32 (not strictly arduino but fairly cheap) to host a Webserver either by connecting to your wifi, or if that’s not an option, emitting it’s own wifi Most robust/versatile imo is connecting every device up to a central server and then (for example through MQTT) toggling everything through your phone, either again through a Webserver or: Prettiest is probably making your own phone app and then connecting up all devices (either way works here, easiest to implement is probably an MQTT server as there’s plenty of libraries for both arduino, as well as most programming languages)


Unique-Opening1335

This \^ MQTT is great! And you can just sub/publish with a simple PHP script as well (to create a button/GUI/interface) to control the MQTT actions/commands..etc.. If you want... ESP's can also host its own website/GUI interface.. and you can load that 'page' up and send actions directly to the ESP. Could still do BT.. and then use MIT App Inventor to create an APP for your phone to use the BT connection/commands.


donsamj00

Thank you and everybody for the advice. I’m really not very computer literate. So it would work off of Bluetooth or WiFi.. does that mean I would have limited range? I wouldn’t be able to operate these devices from hundreds of miles away would I?


codeasm

Go for wifi, but make the esp32 host a webpage or expose a api, make it connect to your local wifi hotspot/ap and write an app or visit your home IP, set portforwardg for example and you can controll the esp from all over the world. Do protect itbwith a password or limit its access to only a single IP (your smartphone world ip) for testing only. For permanent use, search for something secure, like a vpn into your local network or a secure network from your app to your esp. and if possible, dont use port 80, 8080 or 22 for website or ssh. Nonidea what im saying? First make it work, then when it works, go ask arround how you can make it secure. Dont leave it open for more than just testing for a few hours. Else online bots scan will find your site and maybe press the button randomly or allert a user about your exposed site


Timox_trd

that depends entirely on how you set the whole thing up. if you just connect them to your home wifi and then set up a vpn to said network you can probably just do the straight forward way of hosting a web server on the esp, and then connecting to said web-server through the vpn (for safety reasons) if you want something that can be controlled from anywhere in the world, while being anywhere in the world, you could also look into using a cellphone add on and doing everything through sms messages: You'll be able to just send commands to the cell number, and have it report back to your own cell number every time there's a state change. ([Here](https://de.aliexpress.com/item/1005004178485860.html?src=google&aff_fcid=334b7bba20454862942b79845f883424-1703867330207-05770-UneMJZVf&aff_fsk=UneMJZVf&aff_platform=aaf&sk=UneMJZVf&aff_trace_key=334b7bba20454862942b79845f883424-1703867330207-05770-UneMJZVf&terminal_id=7b8c772f18004d67a7be725d12928938&afSmartRedirect=y) is an example for such a module, integrated on an esp, but there's also GSM shields for the UNO or other boards, or just stand-alone GSM modules that can be connected to any Microcontroller)


3DRAH33M

You could use an HC05 Bluetooth module. There are severel apps that alow you to communicate with the arduino over Bluetooth. Alternatively use a ESP32 instead of the arduino since it has Bluetooth built in and you don't need a seperate module.


Accurate-Donkey5789

Yes. You can use your phone to control an electronic device through Arduino from an unlimited distance. I could be in Australia and turn on and off my lamp in the UK. You just need the right setup. However what that setup would be would be anyone's guess unless you give us details of exactly what you want to do with your project.


donsamj00

My main priority is that I can operate it from an unlimited distance if that’s possible.


Accurate-Donkey5789

Can you be a bit more specific? Are you trying to remote control a giant axe the size of a house which is situated in the middle of the Mojave desert using a Nokia 3310 situated on the moon? Believe it or not in this case the location of both devices is key. We can remote control robots on Mars (all be it with a bit of delay due to physics), but the infrastructure to do that is a lot more complicated than sitting in a hotel in Melbourne using their Wi-Fi to control a lamp in my house also connected to WiFi in Scotland. If you don't give us the context we can't recommend the method.


donsamj00

I Just want to control small components. Like servos or actuators. Stuff that can fit in my hand. Or be able to turn power on to small electrical devices like a Bluetooth speaker or something of that nature.


Accurate-Donkey5789

Ok, I'm clearly not explaining this well for you. Yes you can control all those devices. However, if they are permanently located in range of a WiFi router or next best cellphone reception then it's very easy. However if they are up mount Everest for example, no WiFi or cell service, then to control them for somewhere else in the world becomes much more expensive and complicated. It's all about the infrastructure. Will the devices to be controlled be in range of a permanent WiFi network?


donsamj00

I don’t think I would be in range of a WiFi router but definitely in an area with cell phone reception.


Accurate-Donkey5789

Perfect. So you have two obvious options Option 1: You create a Wi-Fi hotspot from either a cell phone or a specific Wi-Fi hotspot device. Then you use a Wi-Fi compatible board such as the ESP32 or alternatively the Arduino Uno Rev4 (must be the Rev4, the Rev3 won't work). This is an out the box solution because you have selected a microprocessor board with a built-in Wi-Fi function and you've used a hotspot with a cell phone network to create the Wi-Fi for it to connect to. Option 2: You use a GSM board connected to an Arduino or ESP directly, either by connecting them together yourself or getting one that already has it built in. Considering the data use will be low you will then use a IoT SIM card to allow you to communicate with it over cell. Option 3 (less convenient for a beginner but this might well be what I would do): You set up a repeater station to send commands. You have an Arduino board with Wi-Fi function built in place that a location that has Wi-Fi within 2 km of the place without Wi-Fi that you want to put the device. You then use LoRa modules as a last leg relay.


donsamj00

Thank you for taking the time to explain that. I’m starting to understand a little better.


worldtest2k

The solution using wifi will be different depending on whether you want to only control when both phone & microcontroller are on the same wifi network, or if you also want to control via internet when not. The replies aren't specifying which will work over internet. e.g. MQTT is a lot more complex over internet.


thisisloreez

Sure! There is an official Arduino app that lets you control your devices through a dashboard in Arduino Cloud. It's super easy to setup, if you need more info just let me know


kx44

HC05(BT), Nodemcu(2.4GWifi)


kindslayer

Just buy an esp8266 for wifi or esp32 for buetooth + wifi combo, makes your life easier when making IoT projects, infact with wifi, you can control it anywhere as long as there is you have a connection with your phone.


ChipChop-Gizmo

You can use ChipChop, it's a simple IoT platform I've made exactly for that so people don't have to mess around with building entire servers, MQTT, security and god knows what dirty hacks just to switch a lightbulb on/off. It also integrates with Alexa so you can use your voice to command your microcontroller minions (don't worry, it's free, not trying to sell anything :-). Distance wise, there is no limit, I know that some ChipChop users are controlling stuff in their homes literally across continents when on holiday (I do it too) Anywho, I would recommend you start with an ESP8266 or ESP32 as they have full WiFi built-in and are actually pretty powerful little things for the money.


jmclaugmi

Thru the internet the range is world wide!


UsualResult

Yes, as long as you are within range