Arama butonu
Bu konudaki kullanıcılar: 1 misafir
14
Cevap
1002
Tıklama
0
Öne Çıkarma
arduino enc28j60
T
9 yıl
Yüzbaşı
Konu Sahibi

mmerhaba arkadaşlar arduinoda enc28j60 internet modülünü bir türlü ne yaptıysam olmadı dns almıyor gibime geldi ama ne hikmetse çözemedim heryerde olan baglantı şekillerini yaptım yinede olmadı acaba yazılımdamı bişe var ama standart yazılımını kullanıyorum
yardım edermisiniz



T
9 yıl
Yüzbaşı
Konu Sahibi

lucky16 paylaşim usta hemen orjinal kodlar diye gerek duymadım açıkçası ama üzerinde degişiklik yapılmış olabilir
// Present a "Will be back soon web page", as stand-in webserver.
// 2011-01-30 <jc@wippler.nl>http://opensource.org/licenses/mit-license.php

#include <EtherCard.h>

#define STATIC 1 // set to 1 to disable DHCP (adjust myip/gwip values below)

#if STATIC
// ethernet interface ip address
static byte myip[] = { 192,168,1,200 };
// gateway ip address
static byte gwip[] = { 192,168,1,1 };
#endif

// ethernet mac address - must be unique on your network
static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };

byte Ethernet::buffer[500]; // tcp/ip send and receive buffer

const char page[] PROGMEM =
"HTTP/1.0 503 Service Unavailable\r
"
"Content-Type: text/html\r
"
"Retry-After: 600\r
"
"\r
"
"<html>"
"<head><title>"
"Service Temporarily Unavailable"
"</title></head>"
"<body>"
"<h3>This service is currently unavailable</h3>"
"<p><em>"
"The main server is currently off-line.<br />"
"Please try again later."
"</em></p>"
"</body>"
"</html>"
;

void setup(){
Serial.begin(57600);
Serial.println("
[backSoon]");

if (ether.begin(sizeof Ethernet::buffer, mymac) == 0)
Serial.println( "Failed to access Ethernet controller");
#if STATIC
ether.staticSetup(myip, gwip);
#else
if (!ether.dhcpSetup())
Serial.println("DHCP failed");
#endif

ether.printIp("IP: ", ether.myip);
ether.printIp("GW: ", ether.gwip);
ether.printIp("DNS: ", ether.dnsip);
}

void loop(){
// wait for an incoming TCP packet, but ignore its contents
if (ether.packetLoop(ether.packetReceive())) {
memcpy_P(ether.tcpOffset(), page, sizeof page);
ether.httpServerReply(sizeof page - 1);
}
}





< Bu mesaj bu kişi tarafından değiştirildi tayfun601 -- 6 Aralık 2016; 13:53:40 >


Bu mesajda bahsedilenler: @lucky16
C
9 yıl
Teğmen

ENC SO -> Arduino pin 12
ENC SI -> Arduino pin 11
ENC SCK -> Arduino pin 13
ENC CS -> Arduino pin 8 (yada 10, Kütühhaneye göre)
ENC VCC -> Arduino 3V3 pin
ENC GND -> Arduino Gnd pin

Arduino Mega için
SO 50 (MISO)
SI 51 (MOSI)
CLK 52 (SCK)
CS 53 (SS)

CS 10. pine takın
UIPEthernet kutuphane kullanın burdan örnek bir kod yazdırıp deneyin
https://github.com/ntruchsess/arduino_uip



DH Mobil uygulaması ile devam edin. Mobil tarayıcınız ile mümkün olanların yanı sıra, birçok yeni ve faydalı özelliğe erişin. Gizle ve güncelleme çıkana kadar tekrar gösterme.