Hi
i´m new to this and try to get my DC-motor to start with fixed speed when i swith buttons.
My plan was that I thought I could use only the L298N and some resistors and buttons to do this but then i understod that i had to use an UNO and program it together. So now I'm stuck and to bad to solve this alone.
I have 5 buttons.
5 on/off dip-swithes that i like to use as 4 different speeds.
- 100% speed when iI swith the first one to ON
- 80% speed when iI swith the second to ON
- 60% speed when iI swith the third to On
- 40% speed when iI swith the fourth to ON
When all is off=off
- Change direktions when turns to ON
Can some happy nice person help me with this 
This is possible to do without programming an UNO but it would actually be easier and faster to learn how to program. Do you have any previous experience with electronics or programming?
The L298N is a very old chip. There are better ones available. But if you already have it, then keep using it.
What is the power supply? Volts and Amps, please.
What motor?
True fixed speed is more difficult than just sending a fixed power level to the motor. If you really need the speed to be controlled then you must measure the speed and change the power output to the motor based on the speed. It is usually enough to just send fixed power levels.
I have 12 volt and a smal DC micro motor connected to pin 7,8, ENA 9 and it works fine
but i don't know how to program start and with my switches and which pin to best use 
MorganS:
... and Amps, please.
MorganS:
What motor?
Show your code which is currently working.
#include <L298N.h>
//pin definition
#define EN 9
#define IN1 8
#define IN2 7
//create a motor instance
L298N motor(EN, IN1, IN2);
void setup() {
motor.setSpeed(255); // an integer between 0 and 255
}
void loop() {
//tell the motor to go forward (may depend by your wiring)
motor.forward();
//change the initial speed
motor.setSpeed(250);
//tell the motor to go back (may depend by your wiring)
motor.backward();
delay(50);
}
OK, good so far. Next time use code tags to post code. The button on the full reply editor looks like </>
Can you write a quick sketch to light up the onboard LED when you switch one of your switches? Test all your switches individually. Start with the Button example in 02.Digital (under File->Examples.)
Next open up the StateChangeDetection example and make it change the light when switch 5 is switched on.
ok, thanks I will try that.