How to setup WIFI Arduino control

Forum about the OS-Railway project available on Thingiverse. Here you can ask questions, look at building pictures, share ideas, pictures and STL's.
Terryn
Posts: 7
Joined: Sun May 31, 2020 5:25 pm

How to setup WIFI Arduino control

Postby Terryn » Sat Feb 06, 2021 10:32 pm

Good Day All,
Sorry if someone already posted this question, I did a search and did not find anything using my exact hardware.
I picked the EMD GP38/39-inspired freight locomotive for OS-Railway to use on the train set I am building for my Grandson.
Following the directions I referred to to the electronics for the Hectorrail 141 Wifi locomotive for OS-Railway. I purchased all the parts listed which included the NodeMCU ESP12E and the Sparkfun motor driver.
This was my first time trying to program an Arduino but with a little help from the Arduino forum I was able to install the sketch file and I can connect to the board with my cell phone via wifi, The people that helped me had to tweak the sketch file I had and they told me the biggest problem was I needed to download a older version of the timer object library. Anyway I built everything up on a breadboard and powered the project up. I was able to connect to the board with my cell phone via wifi. I downloaded and app called Arduino ESP Wifi which prompts you for an IP address and a channel. Based on reading the information in the sketch I used IP address 192.168.4.1 and channel 80 and some control switches and a slider control populate in the software but nothing works. I found out the software will populate the same control functions no matter what you input for an IP address or channel and I don't see anyplace in the software that confirms you have connected to the Arduino. If anyone has any ideas on how I can address this concern it would be greatly appreciated.

Thanks in advance,

Terry

StanHD
Posts: 2
Joined: Sun Jan 10, 2021 1:24 pm

Re: How to setup WIFI Arduino control

Postby StanHD » Mon Feb 08, 2021 5:05 pm

Hi Terry,

I have built this loco recently too. After connecting my phone to the WiFi, I just put the IP Address into a browser. This loaded a simple web-page with the controls on it. No need for an additional App.

Apologies if I have miss-interpreted your query.

Stan

Terryn
Posts: 7
Joined: Sun May 31, 2020 5:25 pm

Re: How to setup WIFI Arduino control

Postby Terryn » Tue Feb 09, 2021 2:20 am

Good Day Stan and thanks for the reply.

That makes better sense to connect to it through a browser.

I connected my cell phone to the device via wifi and typed in the ip address of 192.168.4.1 into a web browser and it says the page isn't working.

If you have time can you send me a copy of your sketch file?

If so my email address is tneuendorf56@gmail.com.

Thanks and have a great day.

Terry

admin
Site Admin
Posts: 409
Joined: Thu Jan 11, 2018 7:46 pm

Re: How to setup WIFI Arduino control

Postby admin » Tue Feb 09, 2021 8:40 pm

Hi!

An error that is very hard to find is when the wifi password is too short. That makes things not work, so make sure it's long enough. (I don't now the actual limits). password = "osrailway" this is verified to work at least.

Best Regards
/Olle

StanHD
Posts: 2
Joined: Sun Jan 10, 2021 1:24 pm

Re: How to setup WIFI Arduino control

Postby StanHD » Wed Feb 17, 2021 5:29 pm

Terryn wrote:
Tue Feb 09, 2021 2:20 am
Good Day Stan and thanks for the reply.

That makes better sense to connect to it through a browser.

I connected my cell phone to the device via wifi and typed in the ip address of 192.168.4.1 into a web browser and it says the page isn't working.

If you have time can you send me a copy of your sketch file?

If so my email address is tneuendorf56@gmail.com.

Thanks and have a great day.

Terry
Hi Terry,

Apologies for such a delayed response (been busy printing a bridge and pylons for the OS Railway :) )

I just used the sketch provided, I made no changes at all, and it just worked for me. Not much help I'm afraid.

Stan


Who is online

Users browsing this forum: No registered users and 1 guest