-
Notifications
You must be signed in to change notification settings - Fork 0
Quick Start Guide
Get your Smart Sit-Stand Desk Controller running with this setup guide.
π¬ Watch the Build Journey - Experience the development adventure and see how to use the finished system.
- β Raspberry Pi Pico W with MicroPython firmware installed
- β All hardware components from the Bill of Materials
- β USB cable for programming and power
- β Computer with Thonny IDE installed
πΊ Pro Tip: Watch the build video to experience the development journey and see the finished system in action.
Connect components according to the pin configuration in Hardware Overview.
π 3D Printed Parts: All enclosures, mounts, and brackets are available in fully open-source CAD format at OnShape CAD Document.
Power Connections:
Pico W 3V3 β All electronics (OLED, ADXL345, ACS712, Encoders, Buttons)
Pico W GND β All component grounds
12V Supply β Motor via H-Bridge only
I2C Connections:
GPIO 4 β OLED SDA GPIO 6 β ADXL345 SDA
GPIO 5 β OLED SCL GPIO 7 β ADXL345 SCL
Motor Control:
GPIO 0 β H-Bridge R_PWM
GPIO 1 β H-Bridge L_PWM
GPIO 20 β Position Encoder CLK
GPIO 21 β Position Encoder DT
GPIO 28 β Current Sensor Output
User Interface:
GPIO 13 β UI Encoder Button (right encoder)
GPIO 14 β UI Encoder DT (right encoder)
GPIO 15 β UI Encoder CLK (right encoder)
GPIO 26 β Down Button
GPIO 27 β Up Button
GPIO 9/10/11 β Preset Buttons 1/2/3
Note: The system uses two separate rotary encoders:
- Left Encoder (GPIO 20/21): Motor position feedback only
- Right Encoder (GPIO 13/14/15): UI navigation with button
# Clone the repository
git clone https://github.com/waliori/RP-pico-sit-stand-firmware.git
cd RP-pico-sit-stand-firmware
- Open Thonny IDE
- Configure interpreter: "MicroPython (Raspberry Pi Pico)"
- Upload all
.py
files to the Pico W - Run
main.py
When you first power on, the system enters calibration mode:
-
Move to Highest Position using manual controls
- Press and hold the rotary encoder button
- "Max encoder set" appears on display
-
Set Real Height Value
- Turn rotary encoder to set actual height (e.g., 120.0 cm)
- Press encoder button to confirm
-
Move to Lowest Position using manual controls
- Press and hold the rotary encoder button
- "Min encoder set" appears
-
Set Minimum Height Value
- Turn encoder to set actual height (e.g., 72.0 cm)
- Press encoder button to confirm
- System saves settings and exits calibration
-
Access Point Mode
- If no saved WiFi, system creates "PicoW" hotspot
- Password:
waliori123
- Connect with phone/laptop
-
Configuration Portal
- Navigate to
192.168.4.1
in web browser - Select your WiFi network
- Enter password and submit
- System will connect and restart
- Navigate to
-
Find IP Address
- Check your router's client list
- Note the IP address for API access
-
Display Test
- Current height shows on OLED
- WiFi icon shows connection status
- Use rotary encoder to navigate menu
-
Movement Test
- Press Up button (GPIO 27) - desk moves up
- Press Down button (GPIO 26) - desk moves down
- Buttons stop movement when released
-
API Test
# Test API connectivity curl http://<desk-ip>/get_height # Should return: {"height": "95.5"}
-
Position 1 (Sitting)
- Move desk to comfortable sitting height
- Press Preset 1 button (GPIO 9) for 3 seconds
- "Preset 1 saved" appears on display
-
Position 2 (Standing)
- Move to standing height
- Press Preset 2 button (GPIO 10) for 3 seconds
-
Position 3 (Custom)
- Set any preferred height
- Press Preset 3 button (GPIO 11) for 3 seconds
Navigation Note: Use the right-side rotary encoder (GPIO 13/14/15) for menu navigation. The left-side encoder (GPIO 20/21) provides motor position feedback only.
Access settings using the right-side rotary encoder (UI navigation):
Menu β Configuration β Sleep Timer: Set display sleep timeout Menu β Configuration β Reminder: Set posture reminder interval Menu β WiFi β Toggle API: Enable/disable web API Menu β Lock/Unlock: Physical lock prevents all movement Menu β Collision Reset: Recalibrate basic safety monitoring
Important: Use the right-side encoder for all menu navigation. The left-side encoder is for position feedback only.
Once WiFi is configured:
Setup Portal: http://<desk-ip>/
API Endpoints:
# Get current height
curl http://<desk-ip>/get_height
# Move to specific height
curl http://<desk-ip>/go?height=100.0
# Go to preset
curl http://<desk-ip>/go_preset?preset=1
# Lock desk
curl http://<desk-ip>/lock
Basic Usage: You're ready to use your smart desk!
API Integration: Review REST API Reference
Hardware Details: Check Hardware Overview
π¬ Build Journey: Experience the complete development adventure in the YouTube documentary to see the system in use.