Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. help newbie: MEGA2560 + Ethernet Shield = always fails

help newbie: MEGA2560 + Ethernet Shield = always fails

Scheduled Pinned Locked Moved Hardware
6 Posts 4 Posters 4.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ruslan
    wrote on last edited by
    #1

    I am truing to build an MQTT gateway with Arduino Mega2560 and Ethernet Shield (based on W5100 chip, like http://arduino.cc/en/Main/ArduinoEthernetShield). I am trying to follow instructions from the manual and this forum? But nothing works. I keep getting the dreaded "0;0;3;0;9;check wires" message.
    Arduino, nrf24l01 and Ethernet Shield modules work separately OK.

    Please help and share a working wiring for Mega + Ethernet shield as well as any necessary edits to the configs.
    Thank you!

    1 Reply Last reply
    0
    • CorvlC Offline
      CorvlC Offline
      Corvl
      wrote on last edited by
      #2

      I am a bit of a noob still on this forum , but I had the same yesterday with a nano, checked the wires a dosen times , und when I put another nano on the breadbord it was working fine . Someone pointed out to clear the eprom. That worked for me. Maybe for you as well.

      Good luck ,
      Cor

      1 Reply Last reply
      0
      • HeinzH Offline
        HeinzH Offline
        Heinz
        Hero Member
        wrote on last edited by
        #3

        Did you wire the radio correctly. The mega needs the PINS 50, 51, 52 to be connected to the radio
        see wiring in:
        http://forum.mysensors.org/topic/949/sensor-for-vallox-digitse-rs485-ventilation-system-with-integration-into-fhem/3

        1 Reply Last reply
        0
        • R Offline
          R Offline
          ruslan
          wrote on last edited by
          #4

          Heinz and Corvl, thank you for the suggestions. I am still struggling though.
          I connected wires as recommended by Heinz
          In the Gateway code I have:
          #define RADIO_CE_PIN 3 // radio chip enable
          #define RADIO_SPI_SS_PIN 4 // radio SPI serial select

          In RF_24config I have:
          #define SOFTSPI //uncommented
          const uint8_t SOFT_SPI_MISO_PIN = 50; //was 16
          const uint8_t SOFT_SPI_MOSI_PIN = 51; //was 15
          const uint8_t SOFT_SPI_SCK_PIN = 52; //was 14

          DigitalIO library installed. Tried replacing Arduino Mega board and radio module. Tried external power source.
          Yet I still get the dreaded “0;0;3;0;9;check wires” message.

          Could someone please share a piece of working gateway code together with wiring instructions for Ethernet gateway with Mega 2560 + W5100 Ethernet Shield + nrf2401?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            sebas
            wrote on last edited by sebas
            #5

            I'm working with a Mega 2560 and ethernet shield. I needed to change the pins in the RF24_config.h file to get it to work.

            This is from my RF24_config.h

             #elif defined SOFTSPI
            	  // change these pins to your liking
                  //
                  const uint8_t SOFT_SPI_MISO_PIN = A2; 
                  const uint8_t SOFT_SPI_MOSI_PIN = A1; 
                  const uint8_t SOFT_SPI_SCK_PIN = A0;  
                  const uint8_t SPI_MODE = 0;
                  #define _SPI spi
            

            And this is my gateway code

            1 Reply Last reply
            0
            • HeinzH Offline
              HeinzH Offline
              Heinz
              Hero Member
              wrote on last edited by Heinz
              #6

              Hi ruslan, sorry for delay.
              I am not sure but I think I did not change anything in RF_Config.h but found out that the radio needs to be connected to those pins 50, 51, 52. Have a look at the mega pinout sheet. It tells you that 50=miso, 51=mosi, 52=sck. So I connected the radio to those pins and it worked. That configuration runs on a sensor without ethernet shield. I believe that it has nothing to do with the shield but more with that special mega pinout.
              Could you simply remove the shield, attach the radio and download a sensor sketch to make sure that the mega and the radio work together. After that step attach the shield and try again with a gateway sketch.

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              52

              Online

              12.0k

              Users

              11.2k

              Topics

              113.4k

              Posts


              Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • MySensors
              • OpenHardware.io
              • Categories
              • Recent
              • Tags
              • Popular