I made a project with the Arduino and the ethernet-shield. The Arduino is hosting a website which I can open via the browser on my laptop. The Arduino is connected to the router via ethernet. All of this works just fine.
Now I have to present this project at school. To prevent unpleasant surprises I wanted to connect the Arduino directly with the laptop via ethernet. My problem is that I am really not well informed about this topic. Please, if possible, tell me what I should do.
The Arduino software includes a Wire library to simplify use of the TWI bus; see the documentation for details. For SPI communication, use the SPI library. The board also can connect to a wired network via ethernet.
Ethernet cables are internationally recognised and all computer manufacturers support their use. They can be used with most hardware, apart from a few ultra-modern laptops. You can still connect these devices to an Ethernet cable you just need to get an Ethernet adapter.
The simplest method to connect two computer systems without using the internet is through an ethernet cable. Once the connection is established the two systems can share files between them and also view and edit those files.
If you take the router out of the loop you will need to:
Assign a manual IP address to the laptop's Ethernet connection say 192.168.0.1
Subnet mask 255.255.255.0
Assign a manual IP address to the Arduino's Ethernet say 192.168.0.2
Subnet mask 255.255.255.0
default Gateway empty
Use a cross-over cable to link the two (a standard patch lead will NOT work)
You should then be able to get your Arduino site up on http://192.168.0.2
from the laptop.
To look smart :) edit your hosts table on the laptop (C:\windows\system32\drivers\etc\hosts for windows) (/etc/hosts for linux) and make an entry:
192.168.0.2 my.arduino
Then you can access it with http://my.arduino
Good luck
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With