ARDUINO BALANCING ROBOT อุปกรณ์ - (1) Arduino Uno Board - (1) 9V 1250 mA wall-wart - (2) 12V DC motors - (1) MMA7455 Accelerometer - (1) Small breadboard Wiring diagram Code ทดสอบการทำงาน #include <Wire.h> //Include the Wire library // wired connections #define HG7881_B_IA 3 // D3 --> Motor B Input A --> MOTOR B + #define HG7881_B_IB 2 // D2 --> Motor B Input B --> MOTOR B - #define HG7881_A_IA 5 // D5 --> Motor A Input A --> MOTOR A + #define HG7881_A_IB 4 // D4 --> Motor A Input B --> MOTOR A - // functional connections #define MOTOR_B_PWM HG7881_B_IA // Motor B PWM Speed #define MOTOR_B_DIR HG7881_B_IB // Motor B Direction #define MOTOR_A_PWM HG7881_A_IA // Motor B PWM Speed #define MOTOR_A_DIR HG7881_A_IB // Motor B Direction /* Accelerometer Info http://yourduino.com/sunshop2/index.php?l=product_detail&p=391 +5V and GND to Arduino/Yourduino...