Battery monitoring while "off"

Thank you for this!

I decided to test this out!

Keyboard

I built and flashed it on the MNT Reform using the following steps:

sudo apt install dfu-programmer gcc-avr avr-libc
git clone https://source.mnt.re/reform/reform.git
cd reform/reform2-keyboard-fw
make
  • Remove the keyboard’s frame, switch the DIP switch SW84 to ON
  • Hit the reset button SW83

With an external keyboard:

su -l
cd /path/to/reform/reform2-keyboard-fw
./flash.sh

(sudo -i ./flash.sh should probably work)
Flip back the SW84 switch, put the frame back on.

LPC

I did the following on a laptop running Arch:

sudo pacman -S gcc arm-none-eabi-gcc arm-none-eabi-newlib
git clone https://source.mnt.re/reform/reform.git
cd reform/reform2-lpc-fw
make lpcrc
make

Then I followed the steps in the instructions. It took a bit of time to find a micro-USB cable that could also transport data :man_facepalming:. The instructions was a bit unclear that the batteries should not be unplugged. As it didn’t show up in /dev on the other computer otherwise.

When I got the virtual flash drive to show up, I simply mounted it at /mnt and ran sudo ./flash.sh.

sudo mount /dev/sdX /mnt
sudo ./flash.sh

Where /dev/sdX was the virtual flash device (/dev/sdc in my case)

Then change back the DIP switch and hit reset.

Conclusion

Everything seems to be working. I now have an ON / OFF indicator in the battery status menu. Which is OFF when the laptop is powered off and ON when running. Hopefully the power drain will be a thing of the past! :smiley:

4 Likes