   Serial.begin(9600);
   bluetooth.begin(9600);
   servo.attach(servoPin);
+  
+  digitalWrite(engineForwardPin, HIGH);
+  digitalWrite(engineBackwardPin, LOW);
+  analogWrite(servoPin, getServoPwm(side, angle, servoFix));
+  analogWrite(enginePowerPin, getEnginePwm(direction, speed));
 }
 
 void loop() {

  Serial.print(newSide);
  Serial.print(" ");
  Serial.print(newAngle);
  Serial.println(END_CMD_CHAR);

  // Handle servo data
  int newServoPwm = getServoPwm(newSide, newAngle);
  if (servoPwm != newServoPwm) {
    servoPwm = newServoPwm;
    servo.write(servoPwm);

#include <SoftwareSerial.h>
#include <Servo.h>

#define bluetoothTx 2
#define bluetoothRx 3
#define engineForwardPin 4
#define engineBackwardPin 5
#define enginePowerPin 6
#define servoPin 9

Servo servo;
SoftwareSerial bluetooth(bluetoothRx, bluetoothTx);

const int SIDE_RIGHT = 1;
const int SIDE_LEFT = 2;

int side = SIDE_RIGHT;
int angle = 0;

int servoFix = 50;

const int DIRECTION_FORWARD = 1;
const int DIRECTION_BACKWARD = 2;

int direction = DIRECTION_FORWARD;
int speed = 0;

int enginePwm = 0;
int servoPwm = 90;
const int MIN_ENGINE_PWM = 0;

// cmd:
// ^ [1|2] [0-100] | [1|2] [0-100] [0-100]$
// ^direction speed | side   angle  servo-fix$
char START_CMD_CHAR = '^';
char END_CMD_CHAR = '$';
char SEP_CMD_CHAR = '|';
