Announcement

Collapse
No announcement yet.

Help getting started with ARDUINO - Ethernet Sheild

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help getting started with ARDUINO - Ethernet Sheild

    Hello all,
    Just recently stumbled on the world of ARDUINO, when I was researching a better way to control my variable speed pool pump, and 3-way valves.

    I purchased an ARDUINO 2560 MEGA, and an Ethernet shield, and an eight channel relay board. I downloaded the plugin and got started.

    The first problem I came across was the USB driver. The instructions recommended going to arduino.cc to download the drivers. So I did, and tried most of the night to get my PC to recognize the MEGA board. As it turns out, the MEGA board I got was a clone, and required different drivers. After sorting out that problem, I was able to connect to the MEGA, and I was able to download the "blink" example program which makes the LED on the board flash.

    After that, I went back to the plugin, and added a board, set up the com port, and added an output pin #13 to the configuration. Then I downloaded the homeseerboard1 firmware to my desktop. Next I uploaded the firmware to the MEGA board. After that I was able to turn on board1 pin13 within homeseer, and manually flash the LED on the MEGA board.

    Everything was progressing smoothly until I tried to add the Ethernet shield on top of the MEGA board. I followed the same success I have already had with the MEGA board by its self. I went back to homeseer plugin, deleted the homeseerboard1 I had already setup, then added a new board.

    On this new board, I didn't use the com port, but instead set up a local IP address, and picked port 9000 as I had read someone else was using it with success. The MAC address populated its self. I added pin 2 as and input, that is all, only 1 input on pin 2 for this test.

    I next downloaded the firmware for homeseerboard1 again, now with the newly added Ethernet shield, and one input pin 2. I went to the ARDUINO programming environment, loaded the new board1 firmware, and hit the upload button. The process began, and stopped with an error that the onewire pin was not configured. I did not set up a onewire device, so I am confused as to why this type of error would come up?

    After more searching and reading on this thread, I have found that I cannot use the most current version of the ARDUINO programming enviroment. I was using VER1.6.4, and so I read I needed to downgrade to VER1.5.6-r2. I tried to upload the new firmware to the ARDUINO & Ethernet Shield combo using both version of the programming environment, and got pretty much the same error with each.

    I am kinda stuck, and was hoping someone could push me back in the right direction?

    Thanks!
    Michael

    #2
    Originally posted by swanie2000 View Post
    Hello all,
    Just recently stumbled on the world of ARDUINO, when I was researching a better way to control my variable speed pool pump, and 3-way valves.

    I purchased an ARDUINO 2560 MEGA, and an Ethernet shield, and an eight channel relay board. I downloaded the plugin and got started.

    The first problem I came across was the USB driver. The instructions recommended going to arduino.cc to download the drivers. So I did, and tried most of the night to get my PC to recognize the MEGA board. As it turns out, the MEGA board I got was a clone, and required different drivers. After sorting out that problem, I was able to connect to the MEGA, and I was able to download the "blink" example program which makes the LED on the board flash.

    After that, I went back to the plugin, and added a board, set up the com port, and added an output pin #13 to the configuration. Then I downloaded the homeseerboard1 firmware to my desktop. Next I uploaded the firmware to the MEGA board. After that I was able to turn on board1 pin13 within homeseer, and manually flash the LED on the MEGA board.

    Everything was progressing smoothly until I tried to add the Ethernet shield on top of the MEGA board. I followed the same success I have already had with the MEGA board by its self. I went back to homeseer plugin, deleted the homeseerboard1 I had already setup, then added a new board.

    On this new board, I didn't use the com port, but instead set up a local IP address, and picked port 9000 as I had read someone else was using it with success. The MAC address populated its self. I added pin 2 as and input, that is all, only 1 input on pin 2 for this test.

    I next downloaded the firmware for homeseerboard1 again, now with the newly added Ethernet shield, and one input pin 2. I went to the ARDUINO programming environment, loaded the new board1 firmware, and hit the upload button. The process began, and stopped with an error that the onewire pin was not configured. I did not set up a onewire device, so I am confused as to why this type of error would come up?

    After more searching and reading on this thread, I have found that I cannot use the most current version of the ARDUINO programming enviroment. I was using VER1.6.4, and so I read I needed to downgrade to VER1.5.6-r2. I tried to upload the new firmware to the ARDUINO & Ethernet Shield combo using both version of the programming environment, and got pretty much the same error with each.

    I am kinda stuck, and was hoping someone could push me back in the right direction?

    Thanks!
    Michael
    You do have to use the older Arduino software. Did you download the different Libraries and install them in your Arduino software Libraries folder? Without those specific libraries the Ethernet shield may not work.

    Comment


      #3
      One more question,

      When you download the libraries, unzip them, and put them into the correct libraries folder inside the main arduino folder, windows prompts to overwrite all the files currently in there with the same name. I allow windows to replace all the original libraries with the ones I downloaded from the homeseer plugin.

      Is this correct?

      The more I mess with it, the worst it seems to get.
      Now the error is complaining about the the IP address
      ******************************************************

      Arduino: 1.5.6-r2 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

      HomeseerBoard1:30: error: 'IPAddress' does not name a type
      HomeseerBoard1:32: error: 'IPAddress' does not name a type
      HomeseerBoard1:33: error: 'IPAddress' does not name a type
      HomeseerBoard1:36: error: 'UDP_TX_PACKET_MAX_SIZE' was not declared in this scope
      HomeseerBoard1:38: error: 'EthernetUDP' does not name a type
      HomeseerBoard1.ino: In function 'void UDPCheck()':
      HomeseerBoard1:42: error: 'Udp' was not declared in this scope

      As of Arduino 1.0, the Udp class in the Ethernet library has been renamed to EthernetUdp.

      HomeseerBoard1:45: error: 'IPAddress' was not declared in this scope
      HomeseerBoard1:45: error: expected `;' before 'remote'
      HomeseerBoard1.ino: In function 'void SendConnect()':
      HomeseerBoard1:236: error: 'Udp' was not declared in this scope

      As of Arduino 1.0, the Udp class in the Ethernet library has been renamed to EthernetUdp.

      HomeseerBoard1:236: error: 'ServerIP' was not declared in this scope
      HomeseerBoard1:240: error: 'HomeseerIP' was not declared in this scope
      HomeseerBoard1.ino: In function 'void SendByte(int)':
      HomeseerBoard1:258: error: 'Udp' was not declared in this scope

      As of Arduino 1.0, the Udp class in the Ethernet library has been renamed to EthernetUdp.

      HomeseerBoard1:262: error: 'Udp' was not declared in this scope

      As of Arduino 1.0, the Udp class in the Ethernet library has been renamed to EthernetUdp.

      HomeseerBoard1.ino: In function 'void SendChar(char*)':
      HomeseerBoard1:274: error: 'Udp' was not declared in this scope

      As of Arduino 1.0, the Udp class in the Ethernet library has been renamed to EthernetUdp.

      HomeseerBoard1:278: error: 'Udp' was not declared in this scope

      As of Arduino 1.0, the Udp class in the Ethernet library has been renamed to EthernetUdp.

      HomeseerBoard1.ino: In function 'void SendFloat(float)':
      HomeseerBoard1:291: error: 'Udp' was not declared in this scope

      As of Arduino 1.0, the Udp class in the Ethernet library has been renamed to EthernetUdp.

      HomeseerBoard1:295: error: 'Udp' was not declared in this scope

      As of Arduino 1.0, the Udp class in the Ethernet library has been renamed to EthernetUdp.

      HomeseerBoard1.ino: In function 'void Sendln()':
      HomeseerBoard1:305: error: 'Udp' was not declared in this scope

      As of Arduino 1.0, the Udp class in the Ethernet library has been renamed to EthernetUdp.

      HomeseerBoard1.ino: In function 'void DataEvent()':
      HomeseerBoard1:352: error: 'Udp' was not declared in this scope

      As of Arduino 1.0, the Udp class in the Ethernet library has been renamed to EthernetUdp.

      HomeseerBoard1:352: error: 'ServerIP' was not declared in this scope
      HomeseerBoard1:463: error: 'Udp' was not declared in this scope

      As of Arduino 1.0, the Udp class in the Ethernet library has been renamed to EthernetUdp.

      HomeseerBoard1:463: error: 'ServerIP' was not declared in this scope
      HomeseerBoard1.ino: In function 'void setup()':
      HomeseerBoard1:522: error: 'ServerIP' was not declared in this scope
      HomeseerBoard1:522: error: 'HomeseerIP' was not declared in this scope
      HomeseerBoard1:530: error: 'Ethernet' was not declared in this scope
      HomeseerBoard1:530: error: 'ip' was not declared in this scope
      HomeseerBoard1:531: error: 'Udp' was not declared in this scope

      As of Arduino 1.0, the Udp class in the Ethernet library has been renamed to EthernetUdp.

      This report would have more information with
      "Show verbose output during compilation"
      enabled in File > Preferences.
      **********************************************************

      End of error

      Comment


        #4
        Originally posted by rprade View Post
        You do have to use the older Arduino software. Did you download the different Libraries and install them in your Arduino software Libraries folder? Without those specific libraries the Ethernet shield may not work.
        Yes, re-downloading the software, the older software, and re-downloading the libraries from the homeseer plugin, is what has now changed the error to the post above.

        Comment


          #5
          Originally posted by swanie2000 View Post
          One more question,

          When you download the libraries, unzip them, and put them into the correct libraries folder inside the main arduino folder, windows prompts to overwrite all the files currently in there with the same name. I allow windows to replace all the original libraries with the ones I downloaded from the homeseer plugin.

          Is this correct?
          Yes, that is correct. Can you post a screenshot of the configuration page for this board and attach the HomeseerBoard1.ino file? You will need to rename it HomeseerBoard1.txt or put it in a .zip file.

          If you installed the older Arduino software after you downloaded and installed the Libraries, they got overwritten, it will need to be don again.

          Comment


            #6
            OK, here are the files you requested.

            And yes, I just re downloaded the older software, and also re downloaded the libraries from homeseer plugin, and just re-merged the folder into the correct libraries folder, overwriting everything.

            The install is completely fresh.
            Attached Files

            Comment


              #7
              Not sure if it matters, but since I have a clone ARDUINO board, I needed different drivers. It shows up as CH340 COM5. See picture.
              Attached Files

              Comment


                #8
                Originally posted by swanie2000 View Post
                OK, here are the files you requested.

                And yes, I just re downloaded the older software, and also re downloaded the libraries from homeseer plugin, and just re-merged the folder into the correct libraries folder, overwriting everything.

                The install is completely fresh.
                OK, it all looks good to me as far as configuration. Those errors you posted above were during the sketch compilation, correct? If so, it still looks like a mismatch in the libraries being used and the sketch you downloaded.

                If it wouldn't cause you too much brain damage, could you uninstall all the Arduino software and delete the entire folder. Then make sure you get version 1.0.5-r2 from here, reinstall it, then download and install (overwrite existing) the Libraries that Greig provides.

                It should work easily. I've done a dozen or so boards with no issue. They certainly will not work until the sketch compiles without error and uploads.

                Comment


                  #9
                  Originally posted by swanie2000 View Post
                  Not sure if it matters, but since I have a clone ARDUINO board, I needed different drivers. It shows up as CH340 COM5. See picture.
                  I'm fairly certain you cannot connect USB and Ethernet at the same time, you will need a separate 7-9V power supply. That wouldn't cause compilation errors, however. The Ethernet connection doesn't require any drivers.

                  Comment


                    #10
                    OK, I am doing what you suggested right now.

                    One thing to note is I was using V1.5.6-r2

                    You are having me download 1.0.5-r2

                    I hope it is as simple as that!

                    I will get back to you soon...

                    Comment


                      #11
                      Originally posted by swanie2000 View Post
                      OK, I am doing what you suggested right now.

                      One thing to note is I was using V1.5.6-r2

                      You are having me download 1.0.5-r2

                      I hope it is as simple as that!

                      I will get back to you soon...
                      You caught me in a mistake, I have been using 1.0.5-r2 and Greigs docs say 1.5.6-r2 so yours should have worked. I do know that the older version I have been using works fine. I will try the 1.5.6-r2 tomorrow on mine. I've been using the same Arduino software since the first beta and never bothered to change it.

                      Comment


                        #12
                        Thanks Randy!

                        After deleting everything, and then downgrading even further than the instructions suggested, to VERSION 1.0.5-r2 I finally got the software to compile a new homeseerboard1 config file without any errors.

                        Of course not at first...

                        I still had to remove the USB power from the computer and just use an USB phone charger to power the ARDUINO MEGA board. (just like you thought)

                        After that, I plugged it into my network, and within a few seconds, I got it to connect in Homeseer!

                        I would have never considered downgrading the version of software to a point below the suggestion in the instruction pdf file.

                        Thanks again, it's late, got to work in the morning. I will keep plugging away with this stuff tomorrow.

                        Michael

                        Comment


                          #13
                          Originally posted by swanie2000 View Post
                          Thanks Randy!

                          After deleting everything, and then downgrading even further than the instructions suggested, to VERSION 1.0.5-r2 I finally got the software to compile a new homeseerboard1 config file without any errors.

                          Of course not at first...

                          I still had to remove the USB power from the computer and just use an USB phone charger to power the ARDUINO MEGA board. (just like you thought)

                          After that, I plugged it into my network, and within a few seconds, I got it to connect in Homeseer!

                          I would have never considered downgrading the version of software to a point below the suggestion in the instruction pdf file.

                          Thanks again, it's late, got to work in the morning. I will keep plugging away with this stuff tomorrow.

                          Michael
                          I admit I am a little confused as well. Since I started in January last year, I never bothered to update the Arduino software. In the help file with 1.0.0.36 which is the current release version it says: "I would suggest using version 1.5.6-r2 or above as there are lots of serial hardware fixes in this build". Now he suggests: "Please only use version 1.5.6-r2 as there are lots of changes that stop the board connecting in the newer builds". So it seems there is only one version to use I guess I have been fine with the older version because I am not using serial.

                          Like I said I'll install the 1.5.6-r2 and libraries tomorrow, test it and get back to you in this thread.

                          Comment


                            #14
                            I Installed Arduino 1.5.6-r2 this morning, re-installed the libraries and got mostly the same errors you did when uploading the sketch. Went back to 1.0.5-r2 and it worked fine. We'll have to get with Greig on this.

                            Comment


                              #15
                              Originally posted by rprade View Post
                              I Installed Arduino 1.5.6-r2 this morning, re-installed the libraries and got mostly the same errors you did when uploading the sketch. Went back to 1.0.5-r2 and it worked fine. We'll have to get with Greig on this.
                              Well I am glad I wasn't doing something wrong. I try to read and figure stuff out on my own before I ask for help, just incase this problem was already asked and answered. Again, thanks for your help.

                              Comment

                              Working...
                              X