Menu
Microbots
0
  • Learn
    • Getting Started
    • Maker Builds
    • Education
  • Shop
    • Modules & Parts
    • Tools & Gears
    • Robots & Displays
  • About
    • Our Story
    • Reach Out
    • FAQs
  • Sign in
  • English
  • Your Cart is Empty
Microbots
  • Learn
    • Getting Started
    • Maker Builds
    • Education
  • Shop
    • Modules & Parts
    • Tools & Gears
    • Robots & Displays
  • 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

47 reviews
Write a review
83%
(39)
4%
(2)
2%
(1)
4%
(2)
6%
(3)
21
43
A
CodeCell C6 Drive
Anonymous

Great product! Having the IMU, motor driver, and battery management directly on the board is incredibly handy for quick prototyping. Love it!

Improvement ideas:
- using an ESP32 other than the C6 to get more cores. On a single-core chip, WiFi tasks often interfere with real-time applications.
- adding two more motor drivers (with a slightly higher current rating) would be awesome for drone projects!
- I know the compactness of the board is a huge selling point and really optimised, but exposing a few more pins would be great. With the motor drivers already occupying 4 pins, having only 4 GPIOs left can be tight for complex projects (though I’m nitpicking, I’m really pushing this board to its limits!).

A
CodeCell C6
Anonymous

I use CodeCell C6, like all the Features, and compactness. The remote Link to the iPhone with some Controls for 2 Motors is just perfect for the job.

O
CodeCell C6 Drive
Odd_Jayy

This is one of my Favorite finds, this board has everything you need to make a quick and small robot, easy to set up and install. Perfect for beginners or a person who needs to save room in their build.

User picture
a
DriveCell
arnaubp

Great products!
Well attention to the detail.
They are so so so small :D

A
CodeCell C6
Anonymous

Love it

123