Menu
Microbots
0
  • Learn
    • Getting Started
    • Maker Builds
    • Education
  • Shop
    • ProtoBot
    • Modules & Parts
    • Tools & Gears
    • Coming Soon
  • About
    • Our Story
    • Reach Out
    • FAQs
  • Sign in
  • English
  • Your Cart is Empty
Microbots
  • Learn
    • Getting Started
    • Maker Builds
    • Education
  • Shop
    • ProtoBot
    • Modules & Parts
    • Tools & Gears
    • Coming Soon
  • About
    • Our Story
    • Reach Out
    • FAQs
  • Language

  • 0 0

CodeCell: Sensing Tap Detection

CodeCell Tap Detection

CodeCell includes a built-in BNO085 motion sensor capable of detecting tap gestures through its onboard accelerometer and sensor fusion algorithms. 

How it Works

The BNO085 continuously monitors acceleration patterns and detects sudden short impulses that match a “tap” motion. Tap detection is handled entirely by the sensor and read through the CodeCell Library, which makes it easy to use with just two lines of code:

myCodeCell.Init(MOTION_TAP_DETECTOR);   // Enable tap detection mode
if (myCodeCell.Motion_TapRead()) {
  // Executes when a tap is detected
}

Each tap triggers a digital flag that can be used to control LEDs, motors, or other actions -all without writing any complex filtering logic.

Example 1 – Basic Tap Detection

This example lights up CodeCell’s onboard LED in yellow for one second whenever a tap is detected.


#include <CodeCell.h>

CodeCell myCodeCell;

void setup() {
  Serial.begin(115200);
  myCodeCell.Init(MOTION_TAP_DETECTOR);  // Enable tap detection
}

void loop() {
  if (myCodeCell.Run(10)) {              // Run at 10 Hz
    if (myCodeCell.Motion_TapRead()) {   // Detect tap
      myCodeCell.LED(0xA0, 0x60, 0x00);  // Yellow LED feedback
      delay(1000);                       // Hold LED for 1 second
    }
  }
}

Customization Tips

  • Change LED Feedback: Modify the LED color or brightness for different tap patterns.
  • Expand Actions: Trigger buzzers, actuators, or other modules for more interactive effects.
  • Combine Sensors: Mix tap detection with light or proximity sensing to create gesture-based projects.

 

  • Share:

Follow

Github

  • About
  • Software
  • Education
  • Contact
  • FAQs
  • Terms
  • Refund Policy
  • Privacy Policy

Join our Community ~ Be the first to know about new products and get exciting deals!

© 2026 Microbots.

★ Reviews

Let customers speak for us

68 reviews
Write a review
84%
(57)
6%
(4)
3%
(2)
3%
(2)
4%
(3)
63
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