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. Development
  3. Is it possible to reduce SRAM usage of Arduino Nano ethernet MySensors gateway (based on ECN28J60) ?

Is it possible to reduce SRAM usage of Arduino Nano ethernet MySensors gateway (based on ECN28J60) ?

Scheduled Pinned Locked Moved Development
3 Posts 2 Posters 287 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.
  • M Offline
    M Offline
    matkor
    wrote on last edited by
    #1

    I need only few binary sensors/switches (relays) controllable from HomeAssistant, so I hoped to add their simple logic to
    https://github.com/mysensors/MySensorsArduinoExamples/blob/master/examples/GatewayENC28J60/GatewayENC28J60.ino
    But building above already takes: Sketch uses 29276 bytes (...) Global variables use 1757 bytes

    I tried to reduce SRAM usage, but disabling MY_DEBUG, MY_RADIO_RF24, MY_INCLUSION_* , MY_DEFAULT_* reduces sizes to
    Sketch uses 22980 bytes (...) Global variables use 1626 bytes (79%)
    only :(

    Is there any way one can go down with SRAM usage further?

    mfalkviddM 1 Reply Last reply
    0
    • M matkor

      I need only few binary sensors/switches (relays) controllable from HomeAssistant, so I hoped to add their simple logic to
      https://github.com/mysensors/MySensorsArduinoExamples/blob/master/examples/GatewayENC28J60/GatewayENC28J60.ino
      But building above already takes: Sketch uses 29276 bytes (...) Global variables use 1757 bytes

      I tried to reduce SRAM usage, but disabling MY_DEBUG, MY_RADIO_RF24, MY_INCLUSION_* , MY_DEFAULT_* reduces sizes to
      Sketch uses 22980 bytes (...) Global variables use 1626 bytes (79%)
      only :(

      Is there any way one can go down with SRAM usage further?

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      @matkor yes. Use the W5100 module instead (if you need ethernet)

      If you don’t need ethernet, use usb or wifi since those options also use less ram.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        matkor
        wrote on last edited by
        #3

        @mfalkvidd

        Use the W5100 module instead (if you need ethernet)

        Good idea, thanks! Same code, but only W5100 based:
        Sketch uses 17190 bytes (...) Global variables use 853 bytes (41%)

        Using W5500 ( Ethernet2.h ) gives even better:
        Sketch uses 14712 bytes (...) Global variables use 809 bytes (39%)

        If you don’t need ethernet, use usb or wifi since those options also use less ram.

        I need some kind of 25m wire so options are ethernet, RS-485 or PJON

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


        13

        Online

        11.7k

        Users

        11.2k

        Topics

        113.0k

        Posts


        Copyright 2019 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