Build Guide
usb_off No device connected
Welcome to FusedFormations IDE!
I'm your Build Guide, here to help you learn by building. I can assist with:
• Writing Python code for your projects
• Understanding programming concepts
• Debugging your builds
• Connecting hardware devices
You have 3 free AI assists available. They reset daily!
Connect your device to start building something amazing!
I'm your Build Guide, here to help you learn by building. I can assist with:
• Writing Python code for your projects
• Understanding programming concepts
• Debugging your builds
• Connecting hardware devices
You have 3 free AI assists available. They reset daily!
Connect your device to start building something amazing!
Start Building:
description main.py ×
terminal Console Output
Welcome to FusedFormations IDE!
Connect your device to start building...
FusedFormations IDE Help
Getting Started
- Connect your MicroPython device (RP2040, ESP32, etc.) via USB
- Click "Connect Device" and select your device
- Write or load Python code in the editor
- Click "Run" to execute on your device
Keyboard Shortcuts
- F5 - Run code
- Ctrl+S - Save file
- Ctrl+O - Open file
- Ctrl+N - New file
Supported Boards
Raspberry Pi Pico (RP2040), ESP32, ESP8266, micro:bit, and any board running MicroPython
Need Help?
Use the Build Guide AI assistant for coding help (3 free assists daily).
⚙️ Motor Control Guide
Standard Servo (0-180°)
Wiring:
| Servo Wire | Connect To | Notes |
|---|---|---|
| Brown/Black | GND | Ground |
| Red | 5V (NOT 3.3V!) | Use VBUS on Pico, VIN on ESP32 |
| Orange/Yellow | GPIO Pin (15) | Any PWM-capable pin |
Working Code:
# Servo Control (Tested & Working)
from machine import Pin, PWM
import time
servo = PWM(Pin(15))
servo.freq(50) # MUST be 50Hz
# Move to specific angle
def move_servo(angle):
duty = 1638 + (angle * (8192 - 1638) // 180)
servo.duty_u16(duty)
# Test it
move_servo(0) # Far left
time.sleep(1)
move_servo(90) # Center
time.sleep(1)
move_servo(180) # Far right 💡 Tips:
- Servos need 5V power, not 3.3V from GPIO
- Can draw 500mA+ when moving - use good power supply
- Add 100-1000µF capacitor across power for stability
- duty_u16() range: 1638 (0°) to 8192 (180°)
DC Motor with H-Bridge
L298N/L293D Wiring:
| H-Bridge Pin | Connect To | Function |
|---|---|---|
| IN1 | GPIO 12 | Direction 1 |
| IN2 | GPIO 13 | Direction 2 |
| ENA | GPIO 14 (PWM) | Speed control |
| OUT1, OUT2 | Motor wires | To motor |
| 12V | External supply | Motor power |
| GND | Common ground | IMPORTANT! |
Working Code:
# DC Motor Control
from machine import Pin, PWM
import time
# Setup pins
IN1 = Pin(12, Pin.OUT)
IN2 = Pin(13, Pin.OUT)
ENA = PWM(Pin(14))
ENA.freq(1000)
# Forward at 50% speed
IN1.on()
IN2.off()
ENA.duty_u16(32768) # 50% of 65535
time.sleep(2)
# Backward at 75% speed
IN1.off()
IN2.on()
ENA.duty_u16(49151) # 75% of 65535
time.sleep(2)
# Stop
IN1.off()
IN2.off()
ENA.duty_u16(0) Stepper Motor (28BYJ-48)
ULN2003 Driver Wiring:
| ULN2003 | GPIO | Color |
|---|---|---|
| IN1 | Pin 16 | Blue |
| IN2 | Pin 17 | Pink |
| IN3 | Pin 18 | Yellow |
| IN4 | Pin 19 | Orange |
Working Code:
# Stepper Motor Control
from machine import Pin
import time
# Define pins
pins = [Pin(16, Pin.OUT), Pin(17, Pin.OUT),
Pin(18, Pin.OUT), Pin(19, Pin.OUT)]
# Half-step sequence
sequence = [
[1,0,0,0], [1,1,0,0], [0,1,0,0], [0,1,1,0],
[0,0,1,0], [0,0,1,1], [0,0,0,1], [1,0,0,1]
]
# Rotate
for _ in range(512): # One full rotation
for step in sequence:
for i, val in enumerate(step):
pins[i].value(val)
time.sleep_ms(2) 🔧 Troubleshooting
Servo Not Moving?
- ✅ Check 5V power (multimeter on red wire)
- ✅ Verify ground connection
- ✅ Test with simple code:
servo.duty_u16(4915) - ✅ Try different GPIO pin
- ✅ Ensure freq is exactly 50Hz
Servo Jittering?
- ⚡ Power issue - add capacitor (100-1000µF)
- ⚡ Use external 5V supply for servo
- ⚡ Check for loose connections
- ⚡ Add delays between movements
DC Motor Issues?
- 🔌 Verify motor power supply is connected
- 🔌 Check common ground between board and driver
- 🔌 Test motor directly with battery first
- 🔌 Remove ENA jumper on L298N for PWM control