Hacker News new | past | comments | ask | show | jobs | submit login

Ha, I just built something like this with a Raspberry Pi for fun. My standing desk (a Conset) only had a up/down button so I used a RPi + relay hat + distance sensor + screen/buttons to allow height presets as well as control via Homebridge:


Not exactly cost effective, but it was a fun way to learn about relays.

Out of curiosity, why did you go with height instead of timing? Wouldn't you get equivalent results without the use of the sensor by activating the motor for a set period of time?

Yeah I tried timing first but it was hard to get right. The weight of the desk affects it and it also goes down quicker then it goes up (not sure if that’s common with all desks - I would assume so). You also can’t use the regular up/down adjustments if you rely on timing as it would be out of sync (I have buttons to raise and lower regularly as well as moving to presets)

Generally things like weight and wear affect timing so it's better practice to measure.

somehow it looks useless and over the top and before you downvote:

I really like this with the hal sensors and that display. Nicely done :-)

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact