Menu
Microbots
0
  • Faire
    • Commencer
    • Constructions de créateurs
    • Éducation
  • Boutique
    • ProtoBot
    • Modules Maker
    • Outils et engrenages
    • Robots et écrans
  • À propos
    • Notre histoire
    • Tendez la main
    • FAQ
  • Connexion
  • français
  • Votre panier est vide
Microbots
  • Faire
    • Commencer
    • Constructions de créateurs
    • Éducation
  • Boutique
    • ProtoBot
    • Modules Maker
    • Outils et engrenages
    • Robots et écrans
  • À propos
    • Notre histoire
    • Tendez la main
    • FAQ
  • Langue

  • 0 0

CodeCell: C6 Drive


CodeCell C6 Drive is a tiny all-in-one robotics board that combines an ESP32-C6 microcontroller, onboard sensors and two H-bridge motor drivers. Each of the two built-in drivers (Drive 1 & Drive 2) can deliver PWM-controlled current to directly power:

  • DC Motors & Gearmotors – for small robots, rovers, or fans.
  • Actuators & Coil-Based Devices – such as CoilPad or FlatFlap.
  • High-Power LEDs – drive lighting or status indicators with smooth PWM dimming.
  • Buzzers & Haptic Actuators – create tones or vibration effects directly from the driver.

Drive Functions

Each driver channel includes several functions for different behaviors:


// 1️⃣ Initialize driver pins and timers
myCodeCell.Drive1.Init();      

// 2️⃣ Drive(direction, power_percent)
// Run the motor or load in a direction (true = forward, false = reverse)
// with PWM power level (0–100% duty cycle)
myCodeCell.Drive1.Drive(true, 80);

// 3️⃣ Tone()
// Generate a sweeping tone using PWM – ideal for audio or feedback vibration
myCodeCell.Drive1.Tone();

// 4️⃣ Pulse(direction, ms_duration)
// Apply a short directional pulse (in milliseconds) – great for flip actuators
myCodeCell.Drive1.Pulse(true, 150);

// 5️⃣ Buzz(us_buzz)
// Toggle output rapidly to create a buzzing sound
myCodeCell.Drive1.Buzz(800);

// 6️⃣ Toggle(power_percent)
// Alternate polarity at a set duty level – creates vibration patterns
myCodeCell.Drive1.Toggle(60);

// 7️⃣ Run(smooth, power_percent, flip_speed_ms)
// Periodically flip polarity for actuators (CoilPad, FlatFlap, etc.)
myCodeCell.Drive1.Run(false, 80, 200);   // Square wave (fast)
myCodeCell.Drive2.Run(true, 60, 400);    // Smooth wave (gentle flap)

Example – Proximity-Controlled Motors

This example links the onboard VCNL4040 proximity sensor with both drive outputs. As your hand moves closer, the output motors or LEDs, spin or brighten faster.


#include <CodeCell.h>

CodeCell myCodeCell;

#define PROXIMITY_RANGE 1000U
#define MOTOR_DEADZONE 30U
#define MOTOR_MAXSPEED 90U

void setup() {
  Serial.begin(115200);
  myCodeCell.Init(LIGHT);        // Enable proximity sensing

  myCodeCell.Drive1.Init();      // Initialize both drivers
  myCodeCell.Drive2.Init();

  myCodeCell.Drive1.Tone();      // Short feedback buzz
  myCodeCell.Drive2.Tone();
}

void loop() {
  if (myCodeCell.Run(10)) {      // Run at 10 Hz
    uint16_t proximity = myCodeCell.Light_ProximityRead();
    proximity = min(proximity, PROXIMITY_RANGE);

    uint8_t speed = map(proximity, 0, PROXIMITY_RANGE,
                        MOTOR_DEADZONE, MOTOR_MAXSPEED);

    myCodeCell.Drive1.Drive(true, speed);
    myCodeCell.Drive2.Drive(true, speed);

    Serial.printf("Proximity: %u | Speed: %u%%\n", proximity, speed);
  }
}

Customization Tips

  • Change Direction: Use false in Drive() to reverse rotation.
  • Tune Deadzone & Speed: Adjust MOTOR_DEADZONE and MOTOR_MAXSPEED for your motors.
  • Alternate Effects: Replace Drive() with Pulse() or Run() for rhythmic motion for flapping actuators.
  • Combine Sensors: Use motion, or gesture sensors to control drive behavior.

 

  • Partager:

Partage

Github

  • À propos
  • Logiciel
  • Éducation
  • Contact
  • FAQ
  • Termes
  • Politique de remboursement
  • politique de confidentialité

Soyez le premier informé des nouveaux projets et bénéficiez d'offres intéressantes !

© 2026 Microbots.

★ Reviews

Let customers speak for us

67 reviews
Write a review
85%
(57)
6%
(4)
1%
(1)
3%
(2)
4%
(3)
62
21
C
CodeCell C3
Cloke74

Great piece of kit, had just what i needed to complete the project i had in mind. Shame shipping to the UK is so expensive, but appreciate this isn’t necessarily in the hands of MicroBots

A
CodeCell C6
Anonymous

I had an issue, got a red light, I used too much flux. Support said clean it, then the one sensor worked fine. I got the help and answer same day I provided a foto.

A
CodeCell C6 Drive
Anonymous

I think this is the best of the ESP offered, most versatile.

User picture
P
CodeCell C6
Prudhvi tej Chinimilli

Been testing the Microbots CodeCell C6 and honestly impressed with how much functionality they packed into such a tiny module. Great form factor for rapid prototyping wearable/embedded sensing applications. ESP32-C6 + IMU integration makes development much easier compared to building everything from scratch.

Still exploring battery optimization and compact LiPo options for our use case, but overall the platform is promising for low-cost real-time sensing systems. Excited to keep building with it.

F
CodeCell C6
Francisco Estivallet

Amazing hardware, my go to for compact projects.

User picture
123