user30117: I'm building a scale which reads a value (from a load cell) and outputs it on a LED screen.
There is a function for the scale, read which will read the value from the scale.
However this is not instantaneous - it uses the yield function to wait until the scale is ready.
The LED screen has a function, display which will display an integer on the screen with no delay. However, this lasts barely a fraction of a second, so it must be repeatedly called.
These functions as is are called one after another inside loop(), but it causes only a quick flash of the LED screen followed by a half second of reading.
How would I allow the LED screen to keep displaying a value while the scale reads? I know there's BlinkWithoutDelay - but I'm not using specific times. There is no instance of the function delay anywhere in the program. I also am not going to edit the library which reads the load cell.

user13594: There is similar questions answered a day ago - Multithreading with Arduino. What your are asking is multitasking or multithreading. Tasks have own loop and task scheduler stops and switches tasks periodically so they appear as if running simultaneously. Task scheduler in turn is usually driver by timer ISR, for AVR a 50-100Hz scheduler timer tick frequency is reasonable.
If there are 2 tasks with same priority (given task scheduler supports priority), they will spare MCU time ~ 50% / 50%. So if timer is 100Hz, each task runs 5ms and interrupted.
Surely task scheduler have overhead, but for small frequency it is negligible, less than 1%. There is no need to modify existing code/library, time sharing is organized transparently.
There are rules to follow when doing multitasking: for example when the scale related function is writing measured value of double type into some variable, this task might be interrupted (by scheduler) during the writing (when only half of the values is written) - and another task will see an incorrect value. The easiest way would be disabling the interrupts during such shared variable update. Google for "race condition", atomic operation, synchronization. 

30117: <p>I'm building a scale which reads a value (from a load cell) and outputs it on a LED screen.</p>

<p>There is a function for the scale, <em>read</em> which will read the value from the scale.
However this is not instantaneous - it uses the yield function to wait until the scale is ready.</p>

<p>The LED screen has a function, <em>display</em> which will display an integer on the screen with no delay. However, this lasts barely a fraction of a second, so it must be repeatedly called.</p>

<p>These functions as is are called one after another inside <em>loop()</em>, but it causes only a quick flash of the LED screen followed by a half second of reading.</p>

<p>How would I allow the LED screen to keep displaying a value while the scale reads? I know there's BlinkWithoutDelay - but I'm not using specific times. There is no instance of the function <em>delay</em> anywhere in the program. I also am not going to edit the library which reads the load cell.</p>
 13594: <p>There is similar questions answered a day ago - <a href="https://arduino.stackexchange.com/questions/18538/multithreading-with-arduino">Multithreading with Arduino</a>. What your are asking is multitasking or multithreading. Tasks have own loop and task scheduler stops and switches tasks periodically so they appear as if running simultaneously. Task scheduler in turn is usually driver by timer ISR, for AVR a 50-100Hz scheduler timer tick frequency is reasonable.</p>

<p>If there are 2 tasks with same priority (given task scheduler supports priority), they will spare MCU time ~ 50% / 50%. So if timer is 100Hz, each task runs 5ms and interrupted.</p>

<p>Surely task scheduler have overhead, but for small frequency it is negligible, less than 1%. There is no need to modify existing code/library, time sharing is organized transparently.</p>

<p>There are rules to follow when doing multitasking: for example when the scale related function is writing measured value of <code>double</code> type into some variable, this task might be interrupted (by scheduler) during the writing (when only half of the values is written) - and another task will see an incorrect value. The easiest way would be disabling the interrupts during such shared variable update. Google for "race condition", atomic operation, synchronization. </p>
