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. Troubleshooting
  3. Arduion IDE error 'MyGateway' does not name a type

Arduion IDE error 'MyGateway' does not name a type

Scheduled Pinned Locked Moved Troubleshooting
10 Posts 3 Posters 6.3k 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.
  • B Offline
    B Offline
    Baran
    wrote on last edited by
    #1

    Greetings,

    I have used Arduino products and the IDE in the past. I downloaded the files for Arduino-Master and placed them where I was directed. When I open the IDE and run the SerialGateway sketch, I get the message in the title, as well as the following;

    Arduino: 1.5.4 (Windows 7), Board: "Arduino Nano, ATmega328"

    SerialGateway:33: error: 'MyGateway' does not name a type
    SerialGateway:35: error: 'MAX_RECEIVE_LENGTH' was not declared in this scope
    SerialGateway.ino: In function 'void setup()':
    SerialGateway:41: error: 'gw' was not declared in this scope
    SerialGateway.ino: In function 'void loop()':
    SerialGateway:46: error: 'gw' was not declared in this scope
    SerialGateway:50: error: 'inputString' was not declared in this scope
    SerialGateway.ino: In function 'void serialEvent()':
    SerialGateway:69: error: 'MAX_RECEIVE_LENGTH' was not declared in this scope
    SerialGateway:71: error: 'inputString' was not declared in this scope
    SerialGateway:75: error: 'inputString' was not declared in this scope

    Would someone be so kind as to suggest where I may be doing things wrong? I have a couple of nano devices connected to my radios . . . all I need is to make them communicate.

    Respectfully - Baran

    hekH 1 Reply Last reply
    0
    • B Baran

      Greetings,

      I have used Arduino products and the IDE in the past. I downloaded the files for Arduino-Master and placed them where I was directed. When I open the IDE and run the SerialGateway sketch, I get the message in the title, as well as the following;

      Arduino: 1.5.4 (Windows 7), Board: "Arduino Nano, ATmega328"

      SerialGateway:33: error: 'MyGateway' does not name a type
      SerialGateway:35: error: 'MAX_RECEIVE_LENGTH' was not declared in this scope
      SerialGateway.ino: In function 'void setup()':
      SerialGateway:41: error: 'gw' was not declared in this scope
      SerialGateway.ino: In function 'void loop()':
      SerialGateway:46: error: 'gw' was not declared in this scope
      SerialGateway:50: error: 'inputString' was not declared in this scope
      SerialGateway.ino: In function 'void serialEvent()':
      SerialGateway:69: error: 'MAX_RECEIVE_LENGTH' was not declared in this scope
      SerialGateway:71: error: 'inputString' was not declared in this scope
      SerialGateway:75: error: 'inputString' was not declared in this scope

      Would someone be so kind as to suggest where I may be doing things wrong? I have a couple of nano devices connected to my radios . . . all I need is to make them communicate.

      Respectfully - Baran

      hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      @Baran

      As your IDE can't find the libraries they must have been put in the wrong folder.

      1 Reply Last reply
      0
      • B Offline
        B Offline
        Baran
        wrote on last edited by
        #3

        Greetings Again,

        I beg forgiveness for my relative density but I am not seeing the problem. The following line stops the compiler and is highlighted in yellow:

        MyGateway gw(DEFAULT_CE_PIN, DEFAULT_CS_PIN, INCLUSION_MODE_TIME, INCLUSION_MODE_PIN, 6, 5, 4);

        The errors are the same as reported above.

        My folder hierarchy is as follows:

        Arduino-master\libraries\MySensors\examples + MySensor.h, MySensor.cpp, MyGateway.h, MyGateway.cpp, plus several .h and .cpp files for the radio.

        As best as I can tell, this is correct - the examples folder is nested in the MySensors folder with all of the .h and .cpp files. Please correct me if I am wrong (and I must be) but I also tried placing all of the .h and .cpp files directly in the examples folder under MySensors to no avail.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          Baran
          wrote on last edited by
          #4

          Also . . . can anyone please tell me where to find stdarg.h? Unlike all the other .h files on GitHub, I cannot find anything that looks like a file with this name. If I am going to include it, I ought to find it first;).

          1 Reply Last reply
          0
          • hekH Offline
            hekH Offline
            hek
            Admin
            wrote on last edited by
            #5

            @Baran said:

            Arduino-master\libraries\MySensors\examples + MySensor.h, MySensor.cpp, MyGateway.h, MyGateway.cpp, plus several .h and .cpp files for the radio.

            This is wrong. Please look at the instructions/pictures here:

            http://www.mysensors.org/build/arduino#installing-the-sensor-libraries

            botbiteB 1 Reply Last reply
            0
            • hekH hek

              @Baran said:

              Arduino-master\libraries\MySensors\examples + MySensor.h, MySensor.cpp, MyGateway.h, MyGateway.cpp, plus several .h and .cpp files for the radio.

              This is wrong. Please look at the instructions/pictures here:

              http://www.mysensors.org/build/arduino#installing-the-sensor-libraries

              botbiteB Offline
              botbiteB Offline
              botbite
              wrote on last edited by
              #6

              @hek I have to agree with Baran. I just downloaded the new 1.4 file twice and followed the download instructions exactly, and I can't get it to recognize any of the # include files aside from SPI. There might be something wrong with how the new version the files were ordered in the zip file or something. If not could you tell us the correct order the files should go?

              1 Reply Last reply
              0
              • hekH Offline
                hekH Offline
                hek
                Admin
                wrote on last edited by
                #7

                @hek said:

                http://www.mysensors.org/build/arduino#installing-the-sensor-libraries

                Copy the libraries-folder out of the zip to the sketchbook-folder on your platform:

                findingLibraries.png

                botbiteB 1 Reply Last reply
                0
                • hekH hek

                  @hek said:

                  http://www.mysensors.org/build/arduino#installing-the-sensor-libraries

                  Copy the libraries-folder out of the zip to the sketchbook-folder on your platform:

                  findingLibraries.png

                  botbiteB Offline
                  botbiteB Offline
                  botbite
                  wrote on last edited by
                  #8

                  @hek There we go! Ok, so it's 'just' the library folder that we're supposed to move to the arduino sketch folder, and then let it merge with the existing arduino library file. That makes more sense.
                  Thanks!

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    Baran
                    wrote on last edited by
                    #9

                    Hi Again,

                    I really feel stupid. I followed the download and unzip instructions and still I received exactly the same errors as in the beginning with an error on the MyGateway gw line.

                    One thing I still cannot resolve is where the program (serial gateway in the MySensors folder) finds the "stdawg.h" file. All of the other associate files (.h, .cpp, etc) reside in the MySensors folder next to the Examples folder. Is it possible that, without this file, my MyGateway.h file is not being properly read?

                    Thank you for your patience - Baran

                    1 Reply Last reply
                    0
                    • botbiteB Offline
                      botbiteB Offline
                      botbite
                      wrote on last edited by
                      #10

                      Baran, just wondering, but did you try to copy and past JUST the library folder from the zip file into the same folder where your Arduino IDE's library folder is located. Let me make it clear that I'm not talking about pasting it into the Arduino library folder itself, but into the same folder that the Arduino's library folder is located. When you do this the computer will bring up a box that says you can't have two folders named library in this location and then ask if you want to consolidate them. You say yes and then they become one folder making it's so your Arduino IDE can find the now one library file.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      11

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.1k

                      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