|
Post by deadman1966 on Feb 26, 2020 23:53:40 GMT
Has anyone on this forum got an internet shield that actually works with shieldbuddy i am porting an app from mega2560
that requires network access and so far i cannot get any network cards to work.
Just wondering at this point if i have wasted money and time on this shieldbuddy card i see numerous questions about
network on these forums but little in regard to solid answers to getting a reliable network working in this unit.
If you have a network shield reliably working on the shieldbuddy can you post detailed information on what CS pins you are using and what library you are using to make it happen.
In my case i need UDP access and my existing application uses the SQL connector library to talk to a remote SQL database. The app works just fine with W5100 shield on the mega2560 i was truly hoping to port this for the
multiprocessor support on the TC275 but i am losing hope of getting anything running on the card seems like a good idea but without a good implementation that works.
Just does not seem to be a straight answer on this anywhere in the forum.
My apologies if my frustration with the shieldbuddy implementation is showing its advertised as mega compatible but it seems far from that after hands on experience with it.
|
|
|
Post by mjb on Feb 27, 2020 7:11:23 GMT
The Shieldbuddy has been tested with the official Arduino Ethernet shield R3 that uses the W5100. It also works with the Ethernet shield2 which uses the W5500.
Which Shields have you tried?
|
|
|
Post by nicolas on Aug 7, 2020 8:04:48 GMT
Hi, I have the same problem as OP, Impossible to detect the ethernet shield (original Arduino Ethernet Shield 2 [WZ5500]) Is there something i'm missing ?
Here is my code just in case :
#include <SPI.h> #include <Ethernet.h>
byte mac[] = { 0xA8, 0x61, 0x0A, 0xAE, 0x7C, 0x0B};
void setup() { // Open serial communications and wait for port to open: SerialASC.begin(9600);
Ethernet.begin(mac); SerialASC.print("server is at "); SerialASC.println(Ethernet.localIP()); }
void loop() { switch (Ethernet.linkStatus()) { case Unknown: SerialASC.println("Unknown"); break; case LinkON: SerialASC.println("ON"); break; case LinkOFF: SerialASC.println("OFF"); break; } delay(1000); }
|
|
|
Post by Admin on Aug 7, 2020 8:23:13 GMT
This has been tested using an Ethernet Shield2 with pin10 as the chipselect for the W5500 and pin4 for the SD card. The SPI is via the 6-way pin header.
|
|
|
Post by Admin on Aug 8, 2020 14:48:19 GMT
This definitely works! You might need to change the IP address though to suit your local network.
/* Web Server
A simple web server that shows the value of the analog input pins. using an Arduino Wiznet Ethernet shield.
Circuit: * Ethernet shield attached to pins 10, 11, 12, 13 * Analog inputs attached to pins A0 through A5 (optional)
created 18 Dec 2009 by David A. Mellis modified 9 Apr 2012 by Tom Igoe
*/
#include <SPI.h> #include <Ethernet2.h>
// Enter a MAC address and IP address for your controller below. // The IP address will be dependent on your local network: byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; IPAddress ip(192, 168, 1, 177);
// Initialize the Ethernet server library // with the IP address and port you want to use // (port 80 is default for HTTP): EthernetServer server(80);
void setup() { // Open serial communications and wait for port to open: SerialASC.begin(9600);
// start the Ethernet connection and the server: Ethernet.begin(mac, ip); server.begin(); SerialASC.print("server is at "); SerialASC.println(Ethernet.localIP()); }
void loop() { // listen for incoming clients EthernetClient client = server.available(); if (client) { SerialASC.println("new client"); // an http request ends with a blank line boolean currentLineIsBlank = true; while (client.connected()) { if (client.available()) { char c = client.read(); SerialASC.write(c); // if you've gotten to the end of the line (received a newline // character) and the line is blank, the http request has ended, // so you can send a reply if (c == '\n' && currentLineIsBlank) { // send a standard http response header client.println("HTTP/1.1 200 OK"); client.println("Content-Type: text/html"); client.println("Connection: close"); // the connection will be closed after completion of the response client.println("Refresh: 5"); // refresh the page automatically every 5 sec client.println(); client.println("<!DOCTYPE HTML>"); client.println("<html>"); // output the value of each analog input pin for (int analogChannel = 0; analogChannel < 6; analogChannel++) { int sensorReading = analogRead(analogChannel); client.print("analog input "); client.print(analogChannel); client.print(" is "); client.print(sensorReading); client.println("<br />"); } client.println("</html>"); break; } if (c == '\n') { // you're starting a new line currentLineIsBlank = true; } else if (c != '\r') { // you've gotten a character on the current line currentLineIsBlank = false; } } } // give the web browser time to receive the data delay(1); // close the connection: client.stop(); SerialASC.println("client disconnected"); } }
/*** Core 1 ***/
/* CPU1 Uninitialised Data */ StartOfUninitialised_CPU1_Variables /* Put your CPU1 fast access variables that have no initial values here e.g. uint32 CPU1_var; */ EndOfUninitialised_CPU1_Variables
/* CPU1 Initialised Data */ StartOfInitialised_CPU1_Variables /* Put your CPU1 fast access variables that have an initial value here e.g. uint32 CPU1_var_init = 1; */ EndOfInitialised_CPU1_Variables
void setup1() { // put your setup code for core 1 here, to run once:
}
void loop1() { // put your main code for core 1 here, to run repeatedly:
}
/*** Core 2 ***/
/* CPU2 Uninitialised Data */ StartOfUninitialised_CPU2_Variables /* Put your CPU2 fast access variables that have no initial values here e.g. uint32 CPU2_var; */ EndOfUninitialised_CPU2_Variables
/* CPU2 Initialised Data */ StartOfInitialised_CPU2_Variables /* Put your CPU2 fast access variables that have an initial value here e.g. uint32 CPU2_var_init = 1; */ EndOfInitialised_CPU2_Variables
void setup2() { // put your setup code for core 2 here, to run once:
}
void loop2() { // put your main code for core 2 here, to run repeatedly:
}
|
|
iban
New Member
Posts: 4
|
Post by iban on Nov 17, 2020 23:46:53 GMT
Good night Admin,
what version of ethernet2 library you use? my vesion ethernet2 1.0.4 compile without error but when I restart the board, reset led in TC275 ShieldBuddy start to blink and don“t work
This version of ethernet2 works on Uno, Mega and Due
thanks,
Iban
|
|