The idle state of the LED should be a constant wave that I believe could represent heartbeat or general activity. I’m thinking of when I usually sit and work my heartrate would find a steady pace and my (brain?) activity would be calm and focused on whatever I’m doing. If someone or something would scare me all of sudden I bet that in most cases, my heart rate would jump in that moment as well as brain activity. Transferring these properties to a LED shouldn’t be hard at least the default/steady-state. That state would represent a “calm” state. Just like most times I have been scared all of a sudden, the time to recover from the scare is equally important in the sketch.
We can ignore the dynamic context that we are dealing with since the LED can’t really fear for something because it is simply reacting according the code. The point is simply that when it’s not (being) scared it should convey that it is calm. As a part of an interaction between a user and the object, conveying the correct state is an important part in the exchange. Below is a graph of the intended interaction.

The aim is to mimic something that we (humans) would express. In the specific context we can establish a level of calmness as a base. When we are being frightened/scared we are immediately put into a reactionary expression. Some do scream other “jump up” and some do both. It’s very hard to pinpoint exactly how people react to being scared as it such a raw reaction which is rooted within our survival instinct. Some people even don’t react to a scare, so this is a highly and tricky reaction to fabricate in a digital way.
Regarding the code, the arduino should listen after the “trigger” (when being scared) and run the code that exhibits the LED being scared. Would reacting randomly to the scare be a more nuanced reaction or will it be a confusing interaction? Also should the recovery time when the LED “realizes there is no danger” correspond to the length of the reaction, as in a big scare results in longer recovery time? It’s going to be interesting finding out the answers and insights.