Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not able to upload arduino code to A16v3 board
#7
(04-12-2025, 11:29 PM)admin Wrote: do you test short the digital input with GND? can you take a photo, how you test with terminal?

Hi i have tested it and it was working fine, but now i am planning to add ethernet support for data trasnfer over the internet. when i  upload the following code. is says no ethernet hardware detected. Kindly help me in this:
#include <Ethernet.h>

#define ETH_SPI_SCS  5  // CS (Chip Select), Green

// Define MAC and IP
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192, 168, 1, 177);


void setup() {
  Serial.begin(9600);
  delay(1000);
  Serial.println("Starting Ethernet connection...");

  //Set the CS pin, required for ESP32 as the arduino default is different
  Ethernet.init(ETH_SPI_SCS);

  //Start the Ethernet connection
  Ethernet.begin(mac, ip);

    //Hardware check
  Serial.println("Checking Ethernet hardware...");
  if (Ethernet.hardwareStatus() == EthernetNoHardware) {
    Serial.println("ERROR: No Ethernet hardware detected!");
    return;
  }
  else {
    Serial.println("Ethernet hardware detected!");
  }

  //Check if cable is connected
  if (Ethernet.linkStatus() == LinkOFF) {
    Serial.println("Link is OFF. Check cable connection.");
  }
  else {
    Serial.println("Link is ON. Cable is connected. Ready to go!");
    Serial.print("To test connection, please ping: ");
    Serial.println(ip);
  }

}

void loop() {
  // put your main code here, to run repeatedly:

}
Reply


Messages In This Thread
RE: Not able to upload arduino code to A16v3 board - by ematicenergies - 06-01-2025, 10:55 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)