pushbutton servo and led

I'd like to code an arduino.
here's what I'm trying to do:
when I press a pushbutton the servo motor opens to a 90 degree angle and also makes an LED light up at the same time. Does anyone have a link to a code that could work and reply please.

mayajade:
I'd like to code an arduino.
here's what I'm trying to do:
when I press a pushbutton the servo motor opens to a 90 degree angle and also makes an LED light up at the same time.

Permission granted. Proceed.

PaulS:
Permission granted. Proceed.

thank you for your help :slight_smile:

mayajade:
thank you for your help :slight_smile:

You failed to indicate what help you needed.

There are examples provided with the IDE for reading the state of a digital pin to which you have wired a switch.
There are examples provided with the IDE for moving a servo.
There are examples provided with the IDE for turning a pin on, that you have connected an LED (and current limiting resistor).

Tain't exactly rocket surgery to combine the 3 examples into one program that does what you want, using the pins you have connected stuff to.

Are you looking to do this code yourself?
If so, follow PaulS's good advice and start from those tutorials.
If you are looking for others to do this code for you, then that is usually a payable service.
The Gigs & Collaborations forum is a great place to pursue that.

The servo goes to 90° by default at startup, so you're already half way there. :slight_smile: