Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Aurigen C3 Rover: pixel title beside an SSD1306 OLED with two robot eyes. Four servo dials for front-left GPIO 0, front-right GPIO 1, back-left GPIO 3 and back-right GPIO 4 swing through the walking gait, angle = 90 + offset + 25 cos(0.005 t + phase), while the BLE command line shows WALK, then STOP.

Wiring · How it walks · Commands · Servo diagnostic · OLED games

The Aurigen C3 Rover is the walking robot from Aurigen's workshops. It runs on an ESP32-C3 SuperMini plugged into an HW566 expansion board, with four SG90 servos for legs, a 0.96 inch OLED that shows animated eyes, and a buzzer. You drive it from your phone over BLE or from the Serial Monitor. Wi-Fi is optional and only adds a clock and the weather.

The firmware is one Arduino sketch, AlbertMicro_C3.ino, adapted from thinking0things/AlbertMicro for the Aurigen pinout. It deliberately has no YouTube integration.

Wiring

Wiring: GPIO 0, 1, 3 and 4 send 50 Hz servo pulses of 500 to 2400 microseconds to the front-left, front-right, back-left and back-right SG90s. GPIO 8 and 9 are I2C SDA and SCL to the SSD1306 OLED at 0x3C on 3V3. GPIO 10 drives a passive buzzer.

Part Connection
Front-left servo signal GPIO 0
Front-right servo signal GPIO 1
Back-left servo signal GPIO 3
Back-right servo signal GPIO 4
OLED SDA GPIO 8
OLED SCL GPIO 9
OLED VCC 3V3
OLED GND GND
Buzzer signal GPIO 10
Buzzer GND GND

The default OLED driver is SSD1306, the usual controller on a 0.96 inch 128x64 I2C OLED. If your display is an SH1106 model, change OLED_DRIVER_SH1106 from 0 to 1 in the sketch. If yours stays blank, try OLED_ADDRESS 0x3D.

GPIO 10 is free, so that's where your buzzer goes. Connect a low-current passive piezo buzzer between GPIO 10 and GND. For a three-pin active buzzer module, SIG goes to GPIO 10, VCC to 3V3 and GND to GND. Don't power a large or 5 V bare buzzer straight from a GPIO pin.

The servos take LEDC channels 0 to 3, so the passive buzzer is pinned to channel 5 at 2 kHz and can't share a servo's PWM signal.

How it walks

Here's the logical angle each servo gets on every pass through loop() while you're in a walking mode:

angle = 90 + offset + scale × 25 × cos(0.005 × t + phase)      t in ms, one stride every 1.26 s
Leg GPIO Offset Phase
Front-left 0 -10 0
Front-right 1 +10 0
Back-left 3 +35 π/2
Back-right 4 -35 π/2

The front pair swings together and the back pair follows a quarter cycle later. scale comes from the command you send (table below). writeServo() then turns the logical angle into a physical one with servoCenter[] and servoDirection[] and clamps it to 20 to 160 degrees.

Libraries

Install these with the Arduino Library Manager:

  • ESP32Servo
  • ArduinoJson
  • Adafruit GFX Library
  • Adafruit SSD1306
  • Adafruit SH110X, only if you use an SH1106 display
  • FluxGarage RoboEyes

Use the ESP32 board package by Espressif Systems and pick an ESP32-C3 board profile. Turn on USB CDC On Boot if your board menu offers it.

Credentials

Copy secrets.h.example to secrets.h, then edit secrets.h beside the sketch. Git ignores your local secrets.h, so your keys stay off GitHub.

  • WIFI_SSID and WIFI_PASSWORD: the 2.4 GHz Wi-Fi network the robot should join.
  • WEATHER_API_KEY: create a free OpenWeather account and get a key at https://home.openweathermap.org/api_keys.
  • WEATHER_CITY: format is City,CountryCode, such as New Delhi,IN or Mumbai,IN.
  • NTP time needs no key. GMT_OFFSET_SEC is already set for India at 19800 seconds.

Leave the Wi-Fi values blank and you still get a robot that works fully offline. The INFO command then shows the robot's status instead of live weather.

BLE / Serial Commands

Connect to the BLE device AlbertC3 with nRF Connect, Serial Bluetooth Terminal or any other BLE UART app (it uses the Nordic UART service). You can also type the same commands into the Serial Monitor at 115200 baud. The sketch upper-cases what it receives and echoes each command back over BLE.

Command What the robot does
WALK walks forward, every leg at scale 1
BACK walks backward, scale -1
LEFT turns left: front legs 0.3, back legs 1.4
RIGHT turns right: front legs 1.4, back legs 0.3
SL spins left: 1.1, -1.1, 1.1, -1.1
SR spins right: -1.1, 1.1, -1.1, 1.1
STOP holds the current pose
UP, CENTER moves every servo to 90
DOWN lies down: left legs to 160, right legs to 20
REST lies down, clears the OLED, tired eyes
INFO sits and shows the time, weather and BLE name, refreshed every 30 s
PUSHUPS four push-ups with angry eyes
SWING four side-to-side swings with happy eyes
GALLOP six gallop strides at ±35 with happy eyes
BEEP 1600 Hz for 120 ms

Start with the servo horns loose. Adjust servoCenter[] and servoDirection[] in the sketch until each leg moves safely and the gait directions make sense for your physical assembly.

Servo diagnostic

If any leg doesn't move, first disconnect the buzzer and upload servo_diagnostic/servo_diagnostic.ino. Keep the robot lifted. It moves the servos in this order: front-left (GPIO 0), front-right (GPIO 1), back-left (GPIO 3), back-right (GPIO 4). Each one goes to 70, 110 and back to 90 degrees, 900 ms apart, and the Serial Monitor (115200 baud) prints which servo and pin it is testing. If GPIO 0 or GPIO 1 still won't move a known-good servo from the back, your problem is the expansion-board connector or its path to the C3, not the robot sketch.

OLED keyboard games

OLED_Keyboard_Games/ runs Dino Runner, Snake and Pong Trainer on the same OLED wiring (SDA 8, SCL 9), played from a serial terminal: A and D for left and right, W and S for up and down, Space or Enter to select, Q for the menu. It's a warm-up before the robot build, so you've already used the screen as a game display and a scoreboard by the time it becomes the robot's face.

Credits

The hardware concept and workshop flow come from thinking0things/AlbertMicro. See NOTICE.md.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages