Little Bird
Trace Unit (For Lidar Bot/Bala)
Description TRACE is mainly consist of 4 sets of IR, 1x infrared emitting and 1x infrared receiver for each set. The infrared LEDs should be placed t...
Description
TRACE is mainly consist of 4 sets of IR, 1x infrared emitting and 1x infrared receiver for each set. The infrared LEDs should be placed towards and close to the ground where having black tracing lines and white background (or vice versa) layouts.
The IR transmitter keep emitting, at the mean time infrared ray would be absorbed by different color of objects. Black can absorb more ray than other color, so the infrared receiver (infrared sensitive phototransistor) would receive less which makes the resistance value of the phototransistor would vary with different object color. Then we assign an AD convertor tp capture the data.
This Unit communicates with the M5Core via GROVE PORTA I2C(0x5A).
Product Features
- operation range: The reflecting surface is less than 11mm from the photoelectric surface
- Program Platform: Arduino, UIFlow(Blockly,Python)
- Two Lego-compatible holes
Kit includes
- 1x TRACE Unit
- 1x Grove Cable
Application
- Self-tracing robot
Documents
Learn
Example
1. Arduino IDE
The code below is incomplete. To get complete code, please click here。
#include <M5Stack.h> #include "Wire.h" #define TRACE_ADDR 0x5a // declaration #define VALUE_SPLIT uint8_t value; int SensorArray[4] = {0}; // initialization m5.begin(); Serial.begin(115200); Wire.begin(); // read data Wire.beginTransmission(TRACE_ADDR); Wire.write(0x00); Wire.endTransmission(); Wire.requestFrom(TRACE_ADDR,1); while(Wire.available()){ value = Wire.read(); } SensorArray[3] = (value&0x08)>>3; SensorArray[2] = (value&0x04)>>2; SensorArray[1] = (value&0x02)>>1; SensorArray[0] = (value&0x01)>>0; 2. UIFlow
To get complete code, please click here。
More information
Schematic
PinMap
M5Core(GROVE A) GPIO22 GPIO21 5V GND TRACE Unit SCL SDA 5V GNDJargon buster
Plain-language definitions for the technical terms used above.
- Grove
- Grove is a plug-in connector ecosystem for sensors and modules that avoids soldering and jumper wires. Grove compatibility matters because it can make it quicker to add supported I2C devices, as long as the cable and voltage are suitable.
- I2C
- I2C is a two-wire communication bus used by many sensors and small modules. It matters because several I2C devices can share the same two wires, but each device needs a compatible address and your controller must support I2C.
- IDE
- Short for Integrated Development Environment, a program used to write, run and manage code. It matters because some learners prefer a traditional coding workspace instead of a guided notebook-style lesson.
- phototransistor
- A light-sensitive transistor that changes its electrical output when light hits it. Compared with a modulated IR receiver, a simple phototransistor can be more affected by ambient light, so it may need extra filtering or careful setup.
Find this product in
Sensors & Input
Related Tutorials
Free guides on learn.littlebird.com.au



