EMO Robot Using Arduino Nano
EMO ROBOT PROJECT ● Electronics Components Required:- 1. Arduino Nano 2. Oled Display 3. Servo Motor 4. Touch Sensor 5. Switch 6. Lithium Ion Battery 7. Battery Holder 8. Breadboard Connections:- ● Library Used:- Adafruit_GFX.h Adafruit_SSD1306.h ● Code:- #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include <Servo.h> // ---------- OLED ---------- #define SCREEN_WIDTH 128 #define SCREEN_HEIGHT 64 Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1); // ---------- SERVO ---------- Servo neck; #define SERVO_PIN 9 int centerPos = 90; int leftPos = 45; int rightPos = 135; int servoPos = centerPos; int stepSize = 2; bool moveRight = true; // ---------- TOUCH SENSOR ---------- #define TOUCH_PIN 2 bool touched = false; // ---------- EYES ---------- int eyeY = 32; int eyeOffset = 0; unsigned long lastBlink = 0; bool blink = false; // ---------- SETUP --------...