🗜️ A custom standing desk that you can control from the command line.
Rust JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Cover Image

Fig Table

License Donate

A repository with everything involved in the design and engineering of the Fig Table. This includes:

  • Server - A Rust HTTP server
  • Client - A Node.js CLI tool that you can easily send requests to the table from.
  • CAD - 3D model schematics for the outer table design.
Product Store Cost
Raspberry Pi 3 B+ w/ PSU Amazon $46.99
32 GB Micro SD Card Amazon $10.59
Relay Board Amazon $7.59
Female to Female GPIO Cables (40) Amazon $4.99
DC Power Pigtails (10) Amazon $5.28
12V 10A Power Supply Amazon $15.47
2x Linear Actuators Ebay $94.27
8' x 12" x 1" Plywood Lowes $36.98
Wood Glue Home Depot $4.47
Gray Stain Home Depot $15.54
Wood Satin Lacquer Home Depot $10.77
Aluminum 6063 Square Tube 4' x 6" X 6" X .125" Metal Supermarkets $60.00
Aluminum 6063 Square Tube 6' x 6" X 3" X .125" Metal Supermarkets $45.00
Aluminum 6063 Square Tube 4' x 4" X 4" X .125" Metal Supermarkets $26.66
Total w/o tax 383.94


For security reasons your Pi should be set up with a firewall to only allow for requests from web ports:

sudo apt-get install ufw
ufw allow 80
ufw enable


The application that runs on the Raspberry Pi 3 B+, creates an HTTP server at port 3007 that a client can POST to.

  • /api - POST API endpoint, you send the following schema.
type APIRequest = {
  // float that describes direction of the table.
  direction: number
  // milliseconds to perform action
  time: number


Instructions come from this guide.

# Step 1: Install the C cross toolchain
sudo apt-get install -qq gcc-arm-linux-gnueabihf

# Step 2: Install the cross compiled standard crates
rustup target add armv7-unknown-linux-gnueabihf

# Step 3: Configure cargo for cross compilation
mkdir -p ~/.cargo
cat >>~/.cargo/config <<EOF\n[target.armv7-unknown-linux-gnueabihf]\nlinker = "arm-linux-gnueabihf-gcc"EOF

# Step 4: Build
cargo build --target=armv7-unknown-linux-gnueabihf


Wire your Pi as follows:

Physical Pin Description Motor Controller
31 GPIO 6 Actuator 1 Up
33 GPIO 13 Actuator 1 Down
35 GPIO 19 Actuator 2 Up
37 GPIO 26 Actuator 2 Down
2 - 5V
39 - GND

Install Raspian lite, and configure it for your keyboard/country since by default it's set to the UK.

Then cd to the standing desk server distribution.

# Download the server
wget https://github.com/alaingalvan/fig-standing-desk/raw/master/server/dist/fig-table-server

# Configure either iptables or an nginx reverse proxy
sudo iptables -t nat -A OUTPUT -o lo -p tcp --dport 80 -j REDIRECT --to-port 3007

# Run the server as root.
sudo ./fig-table-server

# Create a service that includes the server.
cat >>/etc/init/table-server.conf <<EOF\n exec ~/fig-standing-desk/fig-table-server EOF
sudo ln -s /etc/init/table-server.conf /etc/init.d/table-server
sudo service table-server start


CLI Animation

A CLI application that's meant to be installed as a global module on node.

git clone git@github.com:alaingalvan/fig-standing-desk.git
npm i client -g
🍐 fig-table Node.js CLI

    fig-table <number>            Move table up by x centimeters
    fig-table [options]

    -h, --help                    Display this message
    -v, --version                 Print version info and exit
    -c, --config <ip-address>     Configure the app with a unique ip.


Blender files used to design and CNC the table.