Pop up targets

Hi all I'm relatively new to arduino, iv got the basics down. What I'm looking to do is have 6 servo controlled targets that pop up at 90 degrees to be seen then go back down that's easy enough. We're I'm struggling is I want them up for a random amount of time and a random target to pop up. Any help would be great. Thanks all Michael

We can't see your code so we can't see what you're struggling with.

The random() command works pretty well, particularly when used with randomSeed().


Hi The code is no were near finished as I'm unsure how to use the random code can this be done for order and time Thanks Michael

This isn't Google. You don't have to compress your question into 3 words. What does "order and time" mean?

Unless you have a very detailed specification of what you want it to do, we can't write the code for you. The best way is for you to start (maybe by copying examples found on the internet) and then that becomes the specification of what it actually does. Then explaining how you want it to work differently usually can be done much quicker.

Why don’t you write some code that doesn’t do the random part just the basics? Let’s say it just pops target 1 up for 3 seconds then down, then target 2 for 3 seconds and that’s all. That will get you to work out exactly what you need to get a target to pop up and how you need to power it for it to work properly.

When you’ve got that going we can help you add the randomness, which is really not all that difficult.