How could I run two sketches at once? Arduino Uno R3

Hi guys, I'm a teacher and a few weeks ago I started teaching students code with the Arduino and the Raspberry Pi. So far we have a decent, say... 11 arduinos and 4 Raspberry Pi boards, however, considering the class size it is not enough for 1 each so we had to resort to sharing. Because of the wide plethora of projects that are being persued by the class, each board needs 2-3 sketches running at once, for wearables, robot arms, even smart-cars. And with the high price of buying boards from my own money it does get quite much having to provide boards for everyone.

This led me to the question:

How do I run two or more sketches at once?

I would regard myself as a newbie to the Arduino, but not so much to python, etc. Could someone please tell me if I'm missing something in plain sight?

Thanks.

(deleted)

Just have the student upload their sketch to the Arduino before using it. They’re probably going to be doing this anyway as they modify the code. Even if you could run multiple sketches on the Arduino at once, as you want to do, it would be extremely limiting because the Arduino has such limited memory.

Nikita_Sitnikovs:
How do I run two or more sketches at once?

It is possible to make it appear as if an Arduino is doing two (or more) things at a time but I don't think it could have any relevance for sharing an Arduino between students. The demo Several Things at a Time illustrates how an Arduino can do pseudo-multitasking. I think a few minutes study will convince you that it is not appropriate for your situation.

As @pert has said, each student can upload her/his own program. They can each write their code on their PC without an Arduino connected and when the Arduino is available to them it only takes seconds to upload the program to see if it works.

...R

I would make each "sketch" a different function within one sketch. The Arduino can handle a lot of different functions.

I agree with Robin2. It only takes a couple seconds to switch each students codes to a board.