0

The Yun has a Bridge for communicating between the Arduino and Linux processors via a key/value hash. The docs say this is actually stored on the Linux side, but it doesn't say what the limit is.

How many key/value pairs can the Bridge store? What are the practical limitations?

  • 1
    I think that the limit is the memory in the atmega32u4 and the speed limit for the python script on the linux side. About 20 values should be no problem, but when you have 20 different values, all the updating and controlling those 20 values via the bridge can be a problem. When you need 1000 values, perhaps you can try to control everything on the linux side and start a linux-script from the arduino side now and then. The best solution is stop using the yun right now, before you spend too much time struggling with it. Have a look at the mkr wifi boards, or the esp32 or the raspberry pi. – Jot Aug 4 '18 at 4:41
1

The data is just stored in an array within the Python daemon. The ATMega32U4 just sends commands to set / get the values, so there is no limit imposed by the ATMega side of things.

The only limit is the size of the array in Python, and that is restricted by:

  • The amount of available memory in Linux, and
  • Whether or not you have swap space set up on the Yun

Since both those are very much variable (it depends what processes you have running, what your configuration is, etc) the answer can only really be:

  • Quite a few.

Putting memory aside for a moment, an answer to this question on SO states:

According to the source code, the maximum size of a list is PY_SSIZE_T_MAX/sizeof(PyObject*) . On a regular 32bit system, this is (4294967295 / 2) / 4 or 536870912. Therefore the maximum size of a python list on a 32 bit system is 536,870,912 elements.

So you have the smaller of:

  • The maximum you can fit in Linux's memory, and
  • 536,870,912
  • Majenko, google translate has troubles with the expression "quite a few". It can understand "quite a lot" or "a few" and also "quite a few beer", but it gets confused with just "quite a few". It is "many", right? Have you used the arduino yun? Every idea that pops into my mind turns out to be very hard to implement on the arduino yun. – Jot Aug 5 '18 at 4:36
  • GT often struggles with idioms. Quite A Few = A Lot, but not a huge amount. More than a few, less than a massive amount. I have a Yun, but all it is doing at the moment is being a router to connect my sky box to the WiFi. The Yun was a nice idea when first thought up, but MCU technology has moved on since then, and it's pretty redundant now. – Majenko Aug 5 '18 at 10:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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