L298N H-Bridge

L298N H-Bridge
  1. L298N
int dPin = 9; void setup() { Serial.begin(9600); // put your setup code here, to run once: pinMode(dPin, OUTPUT); } void loop() { // put your main code here, to run repeatedly: Serial.print("v: "); int v = map(analogRead(A0), 0, 1023, 0, 255); Serial.print(v); Serial.println(); analogWrite(dPin, v); }