Microbit library for a 12-servo quadruped spider robot driven by a PCA9685 16-channel servo board (e.g. Waveshare Servo Driver for micro:bit, I2C address 0x40). It's based on following popular 3-D printed 12-channel robot. Design files are widely available online. Example: https://www.thingiverse.com/thing:1009659
| Block | What it does |
|---|---|
QuadSpider Initialize |
Sets up the servo driver. Robot stays relaxed (limp). |
QuadSpider Sitdown |
Sits down — body low, safe rest posture. |
QuadSpider Standup |
Stands up to walking height. |
QuadSpider Step forward |
Walks one step forward. |
QuadSpider Step backward |
Walks one step backward. |
QuadSpider Turn left |
Rotates on the spot one step left. |
QuadSpider Turn right |
Rotates on the spot one step right. |
QuadSpider Wave |
Waves hello with a front leg (expandable: how many waves, default 3). |
QuadSpider Wiggle |
Happy-dog greeting: front tilts up and the body wiggles left-right (expandable: how many wiggles, default 3). |
Wire the 12 servos to the PCA9685 channels exactly as below.
| Channel | Leg | Joint | Channel | Leg | Joint | |
|---|---|---|---|---|---|---|
| 0 | Front Right | femur | 6 | Front Left | femur | |
| 1 | Front Right | tibia | 7 | Front Left | tibia | |
| 2 | Front Right | coxa | 8 | Front Left | coxa | |
| 3 | Rear Right | femur | 9 | Rear Left | femur | |
| 4 | Rear Right | tibia | 10 | Rear Left | tibia | |
| 5 | Rear Right | coxa | 11 | Rear Left | coxa |
femur = lift servo in the body · tibia = knee servo on the leg · coxa = hip servo that swings the leg sideways.
Open quadspider.ts and edit:
SERVO_TRIM— per-servo corrections (degrees) found during 90° assembly calibration. Order:[leg][femur, tibia, coxa], legs in order FR, RR, FL, RL.SERVO_CH— change if your wiring differs from the table above.Z_BOOT(sit height),Z_DEFAULT(stand height), and the speed constants, if you want a different look.
Extra functions callable from JavaScript (no blocks yet):
QuadSpider.relax(), QuadSpider.calibration().
Open MakeCode for micro:bit, create a project, click the gearwheel → Extensions, and paste this repository's GitHub URL.
MIT
