sound controled servo

i am going to make a light that turns on and off with the help of a sound sensor.

I have connected the soundsensor at A4 and the servo at D9.

can somewone help me with the code plizz

can somewone help me with the code plizz

You haven’t posted any code.

What is the connection between a light turning on and off and a servo? What sort of servo? What sound sensor? What sort of sound are you expecting to move the servo? Any little noise that happens in the room?

Have you tried any code yet. Like moving a servo with the Knob or Sweep example programs from the IDE? Or reading the sensor using the AnalogInput example (that uses a potentiometer as sensor but other sensors will also work)?


it is a 9 gram servo and i have conected a powersupliy to the servo and connected the grounds to the arduino nano the sound sensor is working. but it won`t upload any code to the arduino it si just loding ween i do it

i ame a noob at coding i nead help

The sound sensor won't upload any code to anything.

Please, if you want help, start providing details - code, schematics, observations.

what is the problem with my arduino nano.

it wont let me send the code from the pc, it is just loading then it says it is a problem

It actually gives you loads of information about what the problem or problems are. If you click the "Copy error messages" button and post all that information here so we can see it then you have a better chance of us working out what the problem is. Just guessing doesn't work very well.