Menu
Microbots
0
  • Robots & Kits
    • ProtoBot
    • CubeBot
    • Robot Parts
  • Modules & Parts
    • CodeCell ESP32 Modules
    • Motors & Actuators
    • LiPo Batteries
  • Gear
    • Tools
    • Merch
  • Learn
    • User Guide & Tutorials
    • DIY Projects & Files
    • Education Discounts
  • About
    • Our Story
    • Reach Out
    • FAQs
  • Sign in
  • Your Cart is Empty
Microbots
  • Robots & Kits
    • ProtoBot
    • CubeBot
    • Robot Parts
  • Modules & Parts
    • CodeCell ESP32 Modules
    • Motors & Actuators
    • LiPo Batteries
  • Gear
    • Tools
    • Merch
  • Learn
    • User Guide & Tutorials
    • DIY Projects & Files
    • Education Discounts
  • About
    • Our Story
    • Reach Out
    • FAQs
  • 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

86 reviews
Write a review
87%
(75)
5%
(4)
2%
(2)
2%
(2)
3%
(3)
80
21
A
ProtoBot
Anonymous

This is a great product for beginners who want hands-on experience with Arduino and 3D printing. The Protobot has a sleek, solid design, and the software is just as polished. I’ve bought several educational robotics kits, and this is the best one so far. Looking forward to more awesome products!

Thank you so much for your kind review! 😊

F
ProtoBot
Francis van Uyten

Really love this robot. I like that is simple to assemble and I like that you guys prepares it easy to start programming with examples and libraries. My opinion on what to improve is more like a add-on, can you guys develop a localisation sensor or function so it will know where the bot is. Expecting only great things coming from you guys. Succes

Thank you so much for your thoughtful review! Glad you’re enjoying ProtoBot 😊 A localisation sensor is a great suggestion! The I²C connection lets you add compatible sensors, so there’s room to explore this. Thanks for your support!

G
Experiment in Progress Mug
Gerald Kendrick

I am enjoying my Experiment in Progress coffee mug. It fits in well in the lab.

Hi Gerald, we’re so glad you’re enjoying it! Thanks for sharing your kind review.

K
12-in-1 Screwdriver (Pen-Size)
Klaas

Very useful fun little screwdriver for the all tiny stuff

Hi Klaas, thanks for the great review! We’re glad you’re enjoying your screwdriver!

f
ProtoBot
frederic marty

I don't have much time right now to test the micro bot, but it looks good.