DINo Internet Ethernet IO board - PING example

 

DINo Internet/Ethernet Relay I/O board

 

PING example

 

 

All in tree steps for beginners

 

Close Arduino IDE software!


(1) Download and unzip in your Arduino libraries folder "ENC28J60 EtherShield Library"s

www.info.kmtronic.com/software/DINo/EtherShield_Arduino_v2.zip

 

 

 

(2) Connect board to USB, Run Arduino and open "EtherShield_webserver" example, modify if necessary MAC and IP address and upload to board

 

 

(3) Connect to your Router or PC Network Card and check for PING

 

 

 

Now time for fun and guaranty some sleepless nights!
 


No PING received?

Don't worry, we spend a lot of time to test many examples, so will help you.



When you sure that hardware works is time you to build your "Hello Word" project and learn step by step.


MINIMUM code for PING reply
--------------------------------------------------------------   

          #include "EtherShield.h"

static uint8_t mymac[6] = {0xCF,0x70,0x7C,0xE4,0x8A,0xB8};
static uint8_t myip[4] = {192,168,1,25};

#define BUFFER_SIZE 550
static uint8_t buf[BUFFER_SIZE+1];

EtherShield es=EtherShield();

void setup(){
es.ES_enc28j60Init(mymac);
es.ES_init_ip_arp_udp_tcp(mymac,myip,80);
}

void loop(){
uint16_t plen,dat_p;

while(1){
dat_p=es.ES_packetloop_icmp_tcp(buf,es.ES_enc28j60PacketReceive
(BUFFER_SIZE, buf));
}

}

--------------------------------------------------------------

 

Downloads

http://www.info.kmtronic.com/software/DINo/PING_example/KMTronic_DINo_PING_example.pde

http://www.info.kmtronic.com/software/DINo/PING_example/KMTronic_DINo_PING_example.zip

 

 

 

 

back to Arduino DINo projects

 

 

Read 11687 times