Seeed
Published © Apache-2.0

Motion recognition based on Seeed XIAO BLE Sense

In this tutorial,we will show you how to utilize the accelerometer on XIAO BLE Sense combined with Edge Impulse to enable motion recognition

BeginnerFull instructions provided5 hours3,277

Things used in this project

Hardware components

Seeed XIAO BLE nRF52840 Sense
Seeed Studio Seeed XIAO BLE nRF52840 Sense
×1
Grove - OLED Display 0.66" (SSD1306)- IIC - 3.3V/5V
Seeed Studio Grove - OLED Display 0.66" (SSD1306)- IIC - 3.3V/5V
×1
Li-po battery (702025)
×1

Software apps and online services

Arduino IDE
Arduino IDE
Edge Impulse Studio
Edge Impulse Studio

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
3D-printed shell
Light guide plastic fiber
Seeed Studio Grove - Universal 4 Pin Buckled 5cm Cable (5 PCs Pack)

Story

Read more

Schematics

_PSL1AfcyTi.png

Code

Data acquisition procedures

C/C++
Open the Arduino IDE, navigate to Sketch -> Include Library -> Manage Libraries... and Search and Install U8g2 library in the Library Manager.
#include <Arduino.h>
#include <U8g2lib.h>
 
#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif
 
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/  PIN_WIRE_SCL, /* data=*/ PIN_WIRE_SDA,  /* reset=*/ U8X8_PIN_NONE);
 
void setup(void) {
  u8g2.begin();
}
 
void loop(void) {
  u8g2.clearBuffer();                   // clear the internal memory
  u8g2.setFont(u8g2_font_ncenB08_tr);   // choose a suitable font
  u8g2.drawStr(32,30,"Hello");    // write something to the internal memory
  u8g2.drawStr(32,45,"Seeed!"); 
  u8g2.sendBuffer();                    // transfer internal memory to the display
  delay(1000);  
}

Credits

Seeed

Seeed

102 projects • 162 followers
Seeed R&D Team

Comments