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. Bug Reports
  3. unusable

unusable

Scheduled Pinned Locked Moved Bug Reports
5 Posts 3 Posters 2.7k Views 2 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.
  • b0rmannB Offline
    b0rmannB Offline
    b0rmann
    wrote on last edited by
    #1

    hi! it's really broken. my sketch (do nothing, only test):

    #include <MySensor.h>
    
    MyTransportNRF24 transport();
    MyHwATMega328 hw;
    MySensor gw(transport, hw);
    
    void setup() {}
    void loop() {}
    

    and compiling:

    mkdir -p build-pro5v328
    /usr/bin/avr-g++ -x c++ -include Arduino.h -MMD -c -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=105  -D__PROG_TYPES_COMPAT__ -I/usr/share/arduino/hardware/arduino//cores/arduino -I/usr/share/arduino/hardware/arduino//variants/standard    -I/usr/share/arduino/libraries/SPI    -I/home/andrej/Projects/Sensors/Energy/libraries/DallasTemperature   -I/home/andrej/Projects/Sensors/Energy/libraries/MySensors -I/home/andrej/Projects/Sensors/Energy/libraries/MySensors/utility   -I/home/andrej/Projects/Sensors/Energy/libraries/OneWire -Wall -ffunction-sections -fdata-sections -Os -fno-exceptions  Energy.ino -o build-pro5v328/Energy.ino.o
    In file included from Energy.ino:2:0:
    /home/andrej/Projects/Sensors/Energy/libraries/MySensors/MySensor.h:158:70: error: expected type-specifier before ‘MyHwDriver’
      MySensor(MyTransport &radio =*new MyTransportNRF24(), MyHw &hw=*new MyHwDriver()
                                                                          ^
    Energy.ino:5:1: error: ‘MyHwATMega328’ does not name a type
     MyHwATMega328 hw;
     ^
    Energy.ino:6:24: error: ‘hw’ was not declared in this scope
     MySensor gw(transport, hw);
                            ^
    
    1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2
      #include <MySensor.h>
      #include <SPI.h>
      
      MyTransportNRF24 transport;
      MyHwATMega328 hw;
      MySensor gw(transport, hw);
      
      void setup() {}
      void loop() {}
      

      This works... note the changes I made.

      1 Reply Last reply
      0
      • fetsF Offline
        fetsF Offline
        fets
        wrote on last edited by
        #3

        @b0rmann it's a compilation error, you must add the following lines before #include <MySensor.h> :

        #include <MyTransportNRF24.h>
        #include <MyHwATMega328.h>

        1 Reply Last reply
        0
        • b0rmannB Offline
          b0rmannB Offline
          b0rmann
          wrote on last edited by
          #4
          This post is deleted!
          1 Reply Last reply
          0
          • b0rmannB Offline
            b0rmannB Offline
            b0rmann
            wrote on last edited by
            #5
            This post is deleted!
            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            24

            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