AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Arduino ethernet udp packet sender1/6/2024 The mac address is the physical address associated with the In this program I’ve used 8888 for both ends. The port can be the same, or different for each end. Each program uses a different port and this port number needs to be shared between the sender and receiver so the two ends know they are talking to the right program. The service port lets several programs all listen for traffic on a single computer (on the PC end anyway). You’ll also need a service port for each end of the connection. This is the destination address in the listing below. If you don’t have many devices on your network, you can probably just pick one at random!Īs well as its own IP address, the Arduino needs to know your computer’s IP address so it knows where to send the data for plotting by MegunoLink Pro. The first three numbers should be the same as you’re computer’s address and the last number should be different to any other device on your network and between 1 and 254. Normally you’d setup the Arduino to request an address from a DHCP server, but to keep things simpler, we can just make one up. Look for the IPv4 Address its probably something like 192.168.15.100. To find out your PC’s address, open the Command Prompt (you’ll find it in the start menu) and type ipconfig. You’ll also need an IP address this should be in the same address range as the IP address of your PC running MegunoLink Pro. However, as long as the device is on a private network just pick a MAC address that doesn’t match any other device on your network. In theory the MAC address should be globally unique, but many Arduino devices don’t come with built-in MAC addresses. Like any internet device, the Arduino ethernet shield will need a MAC address and its own IP address. The first part of the program sets up some configuration we need. The latest version of the program is available on The program was tested with the Freetronics EtherMega, but it should work with any Ethernet equipped Arduino. Initially only the first channel is included, but you can toggle each ADC channel on or off by sending the channel number from MegunoLink Pro’s monitor window. This program will read selected analog inputs and send the data to MegunoLink Pro for plotting. The Arduino libraries makes it very easy to get started with Ethernet communication. UDP can also be used with shields including the Arduino Ethernet and WiFi shields. UDP is a simple protocol which is supported by the Arduino Ethernet libraries and Arduino compatible boards such as the EtherTen and EtherMega, both from Freetronics. MegunoLink Pro supports communication over Ethernet networks using the User Datagram or UDP protocol.
0 Comments
Read More
Leave a Reply. |