logo elektroda
logo elektroda
X
logo elektroda

Remote Control of Arduino Uno via Ethernet Shield and Router Connectivity

Piotrek50501 5106 14
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16300829
    Piotrek50501
    Level 14  
    Hello
    I have an arduino uno and I'm going to buy ethernet shield and here I have a few questions. Is it possible to connect the arduino to the router to be connected to the Internet and control it via the Internet? For example, I connect the arduino to the router and leave the house. I connect to the internet, go to the page that I will control the arduino and, for example, by clicking the button I turn on the diode
  • ADVERTISEMENT
  • #2 16300876
    tmf
    VIP Meritorious for electroda.pl
    Of course you can. Google a little geo and you'll find Prefabs. What's the problem? At least for fun with the Internet, I would choose a slightly more serious platform. However, for the LED on / off implementation it will be ok.
  • ADVERTISEMENT
  • #4 16301252
    Piotrek50501
    Level 14  
    OK thanks. Is it possible to create pages in asp.net to control this microcontroller?
  • #5 16301291
    tmf
    VIP Meritorious for electroda.pl
    @ Piotrek50501 Have you seen Microsoft release its framework for Arduino? This is not the category of microcontrollers at all.
  • ADVERTISEMENT
  • #6 16301370
    Piotrek50501
    Level 14  
    And is there any microcontroller that Microsoft supports?
  • #7 16302634
    JacekCz
    Level 42  
    Piotrek50501 wrote:
    And is there any microcontroller that Microsoft supports?


    There are mini computers with .NET raspeberry class (this is a different edition of the framework, not necessarily everything for a "big" .NET)

    However, I have the impression that you are unclear what the server is, what the client is, and the mindset is a little fluttering.
    At least what you have revealed does not imply that you have thought about it.
  • ADVERTISEMENT
  • #9 16303375
    tmf
    VIP Meritorious for electroda.pl
    @mr_slimm When it comes to the possibility of using ASP and .NET, it is probably easier to look for environments supported by this framework and then choose a hardware platform. Plus, you can google your answers in seconds.
  • #10 16318066
    Piotrek50501
    Level 14  
    Thanks for your help, I have ethernet shield, arduino uno and other parts of building projects with this microcontroller at home. I work a lot in ASP.NET and I am a beginner when it comes to microcontrollers. I also learned PHP and pure HTML code. And I just can't find anywhere how to connect it.
    By doing this:
    1) program the Arduino
    2) connect via ethernet shield to the router
    3) I leave the house and use the arduino by clicking a button on the website, e.g. I turn on the LED at home (primitive)

    Of course, I will have to make a website and upload it to the server. I just don't know in what language to write the page. I already know .NET is out. So what to choose PHP? Java?
  • #11 16318306
    tmf
    VIP Meritorious for electroda.pl
    @ Piotrek50501 Neither of these languages is available on Arduino. Java embedded is, but for much more serious platforms. Everything has to be programmed in C ++. Prefabs are on the net.
  • #12 16319046
    Piotrek50501
    Level 14  
    Somehow I'm having trouble finding :( When it comes to programming arduino, I know that in truncated C. Problem with choosing the language to write the page communicating with the microcontroller. I guess I won't find out what I want :( Maybe in diffrent way. In sequence. I want to connect the arduino to ethernet shield and router. Is it possible to gain access from the outside with this configuration? So from the WAN?
  • Helpful post
    #13 16319058
    ditomek
    Level 22  
    yes, as long as you configure your router so that the device in your home (no matter if the arduino or some other computer) will be visible from the outside.
  • Helpful post
    #14 16319114
    tmf
    VIP Meritorious for electroda.pl
    Piotrek50501 wrote:
    Somehow I'm having trouble finding :( When it comes to programming arduino, I know that in truncated C. Problem with choosing the language to write the page communicating with the microcontroller. I guess I won't find out what I want :( Maybe in diffrent way. In sequence. I want to connect the arduino to ethernet shield and router. Is it possible to gain access from the outside with this configuration? So from the WAN?


    To tell you the truth, it's hard for you to answer because I don't quite know what you mean. I'll start at the end. To get to the WAN, you can - to do this you need to use the normal network mechanisms - forward the selected port, so that the router will forward all references to it to a specific address in the local network. This is a feature of the router and whether the target receiver is Arduino or PC doesn't matter.
    As for the language of the page communicating with the MCU, I don't know what you mean. Arduino acts as a server here. Normally you would have an httpd server running on it, which interprets the inquiries sent from the network and possibly fires the code responsible for executing PHP, .NET code etc. You do not have an httpd server on arduino, you have to program everything yourself from scratch. So you have nothing but the bare packets that come from the client, you have to interpret them and respond to them by sending the code of the html page. On this page you can put anything that, when pressed, will generate a new query to the server (Arduino) that you need to program and as a result you will get a change in the state of some IO pin.
  • #15 16351697
    alemateusiek
    Level 2  
    I recommend using a separate PHP and Mysql server for such tasks. If you are behind Nat you need to redirect the necessary TCP ports in the router configuration or simply set the DMZ to the address of the local server so that you can contact it outside the local network.

Topic summary

The discussion revolves around controlling an Arduino Uno via an Ethernet shield connected to a router, enabling remote access over the Internet. Users confirm that it is feasible to connect the Arduino to a router and control it remotely, such as turning an LED on or off through a web interface. Various projects and resources are suggested for reference. The author inquires about using ASP.NET for web development, but responses indicate that Arduino programming is primarily done in C++. For remote access, proper router configuration, including port forwarding, is necessary. It is also noted that Arduino can act as a server, but it requires custom programming to handle HTTP requests and responses.
Summary generated by the language model.
ADVERTISEMENT