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