Difference between revisions of "Mixly Block Category - Ethernet"

From Microduino Wiki
Jump to: navigation, search
(Connect to Host)
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
=Begin Ethernet=
 
=Begin Ethernet=
 
Initializes the ethernet library and network settings.
 
Initializes the ethernet library and network settings.
 +
*Ethernet - Either Ethernet or Ethernet2. These are just the port to select.
 +
*Mac Address - Assign a MAC address to this Ethernet connection.
  
  
Line 17: Line 19:
 
=Connect to Host=
 
=Connect to Host=
 
Connects to a specified IP address and port. The return value indicates success or failure. Also supports DNS lookups when using a domain name.
 
Connects to a specified IP address and port. The return value indicates success or failure. Also supports DNS lookups when using a domain name.
 +
*Host Address - The address of the host to connect to.
 +
*Port - The port to connect to on the '''Host Address'''.
  
  
Line 54: Line 58:
 
Read more here: https://www.arduino.cc/en/Reference/ClientPrintln
 
Read more here: https://www.arduino.cc/en/Reference/ClientPrintln
 
=Get Request=
 
=Get Request=
 +
Performs a GET request.

Latest revision as of 20:08, 24 February 2017

Allow an Arduino / Microduino board to connect to the internet.

Read more here: https://www.arduino.cc/en/Reference/Ethernet

Begin Ethernet

Initializes the ethernet library and network settings.

  • Ethernet - Either Ethernet or Ethernet2. These are just the port to select.
  • Mac Address - Assign a MAC address to this Ethernet connection.


Read more here: https://www.arduino.cc/en/Reference/EthernetBegin

localIP

Returns the IP of this device once connected to the network. Can be used to determine the IP of the device.


Read more here: https://www.arduino.cc/en/Reference/EthernetLocalIP

Connect to Host

Connects to a specified IP address and port. The return value indicates success or failure. Also supports DNS lookups when using a domain name.

  • Host Address - The address of the host to connect to.
  • Port - The port to connect to on the Host Address.


Read more here: https://www.arduino.cc/en/Reference/ClientConnect

Connected

Returns whether or not the client is connected. Note that a client is considered connected if the connection has been closed but there is still unread data.


Read more here: https://www.arduino.cc/en/Reference/ClientConnected

Available Data

Returns the number of bytes available for reading (that is, the amount of data that has been written to the client by the server it is connected to).


Read more here: https://www.arduino.cc/en/Reference/ClientAvailable

Read

Read the next byte received from the server the client is connected to (after the last call to read).


Read more here: https://www.arduino.cc/en/Reference/ClientRead

Stop

Disconnect from the server.


Read more here: https://www.arduino.cc/en/Reference/ClientStop

Print

Without Newline

Print data to the server that a client is connected to. Prints numbers as a sequence of digits, each an ASCII character (e.g. the number 123 is sent as the three characters '1', '2', '3').


Read more here: https://www.arduino.cc/en/Reference/ClientPrint

With Newline

Print data, followed by a carriage return and newline, to the server a client is connected to. Prints numbers as a sequence of digits, each an ASCII character (e.g. the number 123 is sent as the three characters '1', '2', '3').


Read more here: https://www.arduino.cc/en/Reference/ClientPrintln

Get Request

Performs a GET request.