
Type e
google/mozc-devices
Circuit diagrams and firmware source code for Gboard DIY keyboards

An autonomous 2line-following robot built on the Teensy microcontroller with advanced vision-based steering using Pixy2 camera. Designed for precision line tracking with intersection detection and obstacle avoidance.
Shield teensy is an open-source printed circuit board by Ayoub-Ben-Yedder, from the Ayoub-Ben-Yedder/NXP repository on GitHub. It is a 2-layer board of 54.9 × 68.3 mm with 16 parts on 29 nets, routed with 136 tracks and 0 vias.
Its parts include 9 connectors, 4 resistors, 2 diodes and 1 IC.
An autonomous 2line-following robot built on the Teensy microcontroller with advanced vision-based steering using Pixy2 camera. Designed for precision line tracking with intersection detection and obstacle avoidance.
This project implements a sophisticated autonomous robot controller that:
The electronics are primarily a Teensy 4.0 shield custom designed with KiCAD. The shield integrates all necessary components (motor drivers, sensor interfaces, power distribution) onto a single PCB that stacks directly onto the Teensy 4.0 microcontroller, providing a clean and compact solution for the robot.



All design files are located in the electronics/ directory.
The mechanical design for this robot was adapted from the NXP CUP FINALS repository. This includes the chassis, motor mounts, sensor brackets, and other structural components required for the robot assembly.
PWM1 = 8 (Left motor speed)
IN1 = 6 (Left motor direction)
IN2 = 7 (Left motor direction)
PWM2 = 18 (Right motor speed)
IN3 = 20 (Right motor direction)
IN4 = 19 (Right motor direction)
LED = 22
ECHO = 15 (Ultrasonic echo)
TRIG = 14 (Ultrasonic trigger)
SERVO_PIN = 23 (Steering servo)This project uses PlatformIO for build and upload management.
pio runpio run --target uploadpio device monitor
Initialization
Main Loop (runNXP)
Distance Monitoring
MAX_VECTORS = 20 // Max vectors to process per frame
MIN_VECTOR_LENGTH = 10 // Minimum pixels for valid vector
CENTRE_ANGLE = 135 // Neutral steering position
MAX_RIGHT = 180 // Maximum right turn
MAX_LEFT = 90 // Maximum left turn
STOP_DISTANCE = 15 // cm - obstacle stop threshold
PIXY_FORWARD_ANGLE = 270 // Expected angle for straight tracking
PIXY_STEER_DEADBAND = 15 // Angle tolerance for horizontal detection
STEERING_DELAY_CYCLES = 2 // Smoothing delay for steering changes
STEERING_QUEUE_THRESHOLD = 2.0 // Threshold to queue steering change
STEERING_CENTER_BIAS = 5.0 // Pull toward center amount
STEERING_SOFT_LIMIT_START = 11 // When to start softening
STEERING_SOFT_LIMIT_FACTOR = 0.5 // Softening strength
CROSS_CORRECTION_ANGLE = 15 // Intersection correction| Issue | Solution |
|---|---|
| Robot doesn't follow line | Check Pixy2 is in "line" mode; verify camera focus; check lighting |
| Erratic steering | Increase STEERING_DELAY_CYCLES; adjust STEERING_CENTER_BIAS |
| Misses turns | Lower angle threshold in intersection detection; increase CROSS_CORRECTION_ANGLE |
| Oscillates | Enable soft limiting; increase STEERING_SOFT_LIMIT_FACTOR |
| Overshoots finish line | Reduce finish line acceleration value; increase STOP_DISTANCE |
NXP/
├── src/
│ ├── main.cpp # Main robot controller
│ └── README.md # This file
├── include/
├── lib/
├── platformio.ini # Build configuration
└── test/Last Updated: June 2026
Board: Teensy
Camera: Pixy2
Competition: NXP
| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | LED | LED_THT:LED_D3.0mm | D1, D2 |
| 2 | R | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | R1, R2 |
| 2 | R | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P2.54mm_Vertical | R3, R4 |
| 2 | motor in 1 | Connector_JST:JST_XH_B3B-XH-A_1x03_P2.50mm_Vertical | J3, J4 |
| 1 | DEV-15583 | DEV-15583:MODULE_DEV-15583 | U1 |
| 1 | Encoder 1 | Connector_JST:JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical | J5 |
| 1 | Encoder 2 | Connector_JST:JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical | J6 |
| 1 | I2C conn | Connector_JST:JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical | J8 |
| 1 | SPI conn | Connector_JST:JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical | J7 |
| 1 | Screw_Terminal_01x02 | TerminalBlock_MetzConnect:TerminalBlock_MetzConnect_Type055_RT01502HDWU_1x02_P5.00mm_Horizontal | J2 |
| 1 | Servo Motor | Connector_JST:JST_XH_B3B-XH-A_1x03_P2.50mm_Vertical | J10 |
| 1 | Ultrason conn | Connector_JST:JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical | J9 |

google/mozc-devices
Circuit diagrams and firmware source code for Gboard DIY keyboards

conorpp/u2f-zero
U2F USB token optimized for physical security, affordability, and style

rusefi/rusefi
rusefi - GPL internal combustion engine control unit

VoronDesign/Voron-Hardware
Cool Hardware designed by the Voron Design group

hoglet67/RGBtoHDMI
Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!


It measures 54.9 × 68.3 mm and has 2 copper layers, 1.6 mm thick.
16 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the Ayoub-Ben-Yedder/NXP repository on GitHub, at the commit this page was made from: the board is electronics/shield teensy.kicad_pcb and its schematic electronics/shield teensy.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask Ayoub-Ben-Yedder before reusing the design.