Anton Shestakov <engored@ya.ru>, Sun, 13 Oct 2013 13:31:58 +0900
Steps to Recreate.
car2wd_bt/car2wd_bt.ino
Permissions: -rw-r--r--
unsigned long lastmsg = 0; if (Serial.available() > 0) { int a = Serial.parseInt(); int b = Serial.parseInt(); if (Serial.read() == '\n') { unsigned int fade = (millis() - lastmsg) / 1000; analogWrite(IN3, map(lspd, 0, 127, 0, 255)); analogWrite(IN4, map(lspd, 0, -128, 0, 255)); analogWrite(IN1, map(rspd, 0, 127, 0, 255)); analogWrite(IN2, map(rspd, 0, -128, 0, 255));