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 3.2k 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.
  • B Offline
    B 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
    • H Offline
      H 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
      • F Offline
        F 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
        • B Offline
          B Offline
          b0rmann
          wrote on last edited by
          #4
          This post is deleted!
          1 Reply Last reply
          0
          • B Offline
            B Offline
            b0rmann
            wrote on last edited by
            #5
            This post is deleted!
            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


            42

            Online

            12.1k

            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