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. Error when i compile sketch

Error when i compile sketch

Scheduled Pinned Locked Moved Troubleshooting
8 Posts 3 Posters 5.0k 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.
  • eliabieriE Offline
    eliabieriE Offline
    eliabieri
    wrote on last edited by
    #1

    When I want to compile the sketch so send sensor data to my RPi i get this error:
    BinarySwitchSensor:14: error: 'Bounce' does not name a type
    BinarySwitchSensor.ino: In function 'void setup()':
    BinarySwitchSensor:27: error: 'debouncer' was not declared in this scope
    BinarySwitchSensor.ino: In function 'void loop()':
    BinarySwitchSensor:40: error: 'debouncer' was not declared in this scope
    What can i do?

    hekH 1 Reply Last reply
    0
    • eliabieriE eliabieri

      When I want to compile the sketch so send sensor data to my RPi i get this error:
      BinarySwitchSensor:14: error: 'Bounce' does not name a type
      BinarySwitchSensor.ino: In function 'void setup()':
      BinarySwitchSensor:27: error: 'debouncer' was not declared in this scope
      BinarySwitchSensor.ino: In function 'void loop()':
      BinarySwitchSensor:40: error: 'debouncer' was not declared in this scope
      What can i do?

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

      @eliabieri

      You have probably just missed to add the libraries.

      1 Reply Last reply
      0
      • eliabieriE Offline
        eliabieriE Offline
        eliabieri
        wrote on last edited by
        #3

        No, I added them! Under Examples I can see the library.
        But theres something wrong with the include of the Bounce2.h, Sensor.h and RF24.h. They dont change to orange like EEPROM.h and SPI.h does.
        Its the same problem in every example sketch

        hekH 1 Reply Last reply
        0
        • eliabieriE eliabieri

          No, I added them! Under Examples I can see the library.
          But theres something wrong with the include of the Bounce2.h, Sensor.h and RF24.h. They dont change to orange like EEPROM.h and SPI.h does.
          Its the same problem in every example sketch

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

          @eliabieri

          Hmm... something is obviously wrong in your setup. Did you restart IDE after adding the libraries?

          1 Reply Last reply
          0
          • eliabieriE Offline
            eliabieriE Offline
            eliabieri
            wrote on last edited by
            #5

            Yes I did!

            1 Reply Last reply
            0
            • eliabieriE Offline
              eliabieriE Offline
              eliabieri
              wrote on last edited by
              #6

              I found the solution.
              I copied all the libraries directly to the libraries folder of the Arduino IDE
              now it works!

              epierreE 1 Reply Last reply
              0
              • eliabieriE eliabieri

                I found the solution.
                I copied all the libraries directly to the libraries folder of the Arduino IDE
                now it works!

                epierreE Offline
                epierreE Offline
                epierre
                Hero Member
                wrote on last edited by
                #7

                I did that too, for arduino 1.0.1 under debian 7.5:

                In file included from /usr/share/arduino/libraries/RF24/RF24.h:788:0,
                from SerialGateway.cpp:26:
                /usr/share/arduino/libraries/RF24/RF24.c:27:21: fatal error: spi/spi.h: Aucun fichier ou dossier de ce type
                compilation terminated.

                when downloading 1.0.5 (following) I have:
                SerialGateway.ino:31:25: fatal error: avr/progmem.h: Aucun fichier ou dossier de ce type

                when running 1.5.6r2 or nightly I have:

                SerialGateway:41: error: ‘Gateway’ does not name a type
                SerialGateway:44: error: ‘MAX_RECEIVE_LENGTH’ was not declared in this scope
                SerialGateway.ino: In function ‘void setup()’:
                SerialGateway:50: error: ‘gw’ was not declared in this scope
                SerialGateway:57: error: ‘MsTimer2’ has not been declared
                SerialGateway:58: error: ‘MsTimer2’ has not been declared
                SerialGateway:60: error: ‘PCintPort’ has not been declared
                SerialGateway.ino: In function ‘void loop()’:
                SerialGateway:66: error: ‘gw’ was not declared in this scope
                SerialGateway.ino: In function ‘void startInclusionInterrupt()’:
                SerialGateway:73: error: ‘gw’ was not declared in this scope
                SerialGateway.ino: In function ‘void ledTimersInterrupt()’:
                SerialGateway:77: error: ‘gw’ was not declared in this scope
                SerialGateway.ino: In function ‘void checkSerialInput()’:
                SerialGateway:84: error: ‘gw’ was not declared in this scope
                SerialGateway:84: error: ‘inputString’ was not declared in this scope
                SerialGateway.ino: In function ‘void serialEvent()’:
                SerialGateway:102: error: ‘MAX_RECEIVE_LENGTH’ was not declared in this scope
                SerialGateway:104: error: ‘inputString’ was not declared in this scope
                SerialGateway:108: error: ‘inputString’ was not declared in this scope

                z-wave - Vera -> Domoticz
                rfx - Domoticz <- MyDomoAtHome <- Imperihome
                mysensors -> mysensors-gw -> Domoticz

                1 Reply Last reply
                0
                • epierreE Offline
                  epierreE Offline
                  epierre
                  Hero Member
                  wrote on last edited by
                  #8

                  Hello,

                  good news, it works but here is the solution:

                  • ide 10.3 to 1.0.5 fails to work.

                  • 1.5.6r2 works but the sketch directory is now called Arduino, and then it works...just select port to ttyACM0 and not COM1 !

                  z-wave - Vera -> Domoticz
                  rfx - Domoticz <- MyDomoAtHome <- Imperihome
                  mysensors -> mysensors-gw -> Domoticz

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


                  14

                  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