0

I'm planning to use an Arduino Nano v3 for a simple project plus some devices like capacitive touch buttons, an LCD display and a Bluetooth module on an I²C. Will these devices require (like classes or function in programming) that might take up the entirety of the 30KB space?

Devices:
HC-SR04 Distance Sensor
TTP229 Capacitive touch sensor
LCD1602+HD44780 LCD Display
HC-06 Bluetooth module

1
  • 3
    Please edit question and specify model number of LCD and Bluetooth module. Graphic LCDs use rather more memory than text LCDs. That aside, without details about the application, the question isn't particularly answerable. Commented Jan 6, 2017 at 9:38

2 Answers 2

0

The number of modules isn't really relevant; your PC deals with that during compilation and linking. The unbreakable requirement is that the total size of all the modules not exceed the size of available Flash memory.

The Bluetooth module won't need a library module unless you use SoftwareSerial to make another port for it. The two sensors' library footprints won't be too big. The LCD probably has at least one character table and maybe several sizes of each of several fonts. That's likely to be your largest one.

I always find microcontrollers' RAM size to impose much more stringent requirements than their Flash sizes.

0

The devices will require some code to make them work and there is a chance, depending on how you write the code, that this may consume all the available RAM on the chip. However I doubt you will go to more than 60% if you use the standard libraries for those devices, but there is only one way to find out...

Get the libraries for the devices and look at the examples for each device. You should be able to hack an "example" of your own that calls all 4 examples in the main loop(). This should give you an idea of how much memory you are going to use.

If you use too much it might be possible to snip pieces away from the libraries, the LCD will probably have font tables that you don't need for instance. Or you could use an alternative Arduino.

2
  • If that so, I mignt refactor the library. Had an rpi but it consume alot more power. Commented Jan 6, 2017 at 13:51
  • I doubt you will need to. Commented Jan 6, 2017 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.