1234567891011121314151617181920212223242526272829303132 |
- //L298N Motorsteuerung
- //speed control
- int GSM1 = 10; // -> on ENA
- int in1 = 8; // is on input 1
- int in2 = 9; // is on input 2
- void setup() {
- // put your setup code here, to run once:
- Serial.begin(9600);
- pinMode(GSM1, OUTPUT);
- pinMode(in1, OUTPUT);
- pinMode(in2, OUTPUT);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- Serial.println("Works");
-
- analogWrite(GSM1, 70);
- digitalWrite(in1, HIGH);
- digitalWrite(in2, LOW);
- delay(2000);
- digitalWrite(in1, LOW);
- digitalWrite(in2, HIGH);
- delay(2000);
- }
|