Skip to content

maebemae/TheButton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THE BUTTON

This project aims to solve a key issue of the everyday programmer - how to safely, reliably, and in a repeatable fashion provide good feedback.

Demonstration

Youtube Video showing the button in action

Using the configurator

The button will open a com port on your machine.

To configure, simply connect to it with 115200 baud rate, and follow the instructions. Do not forget to save the new settings by writing to flash, else they will be lost after a power cycle.

(On mac typically /dev/tty.usbmodem00011, on linux /dev/tty.ACME0) If not sure, open the com port listing (i.e. ls /dev/tty, or check the list in windows, connect the button, and see what changed)

If you have chrome, you can navigate to https://www.serialterminal.com/index.html Or else you can use screen, minicom, or any other com

This could be as simple as screen /dev/tty.usbmodem00011. To disconnect, just unplug the button

Flashing the firmware

Using USB DFU

  1. Put The Button into DFU mode, either by a. Fully pressing the button and then plugging it in, or b. Pressing the 'boot' button and then plugging it in
  2. You can use the STM32CubeProgrammer or DfuSe
  3. Select USB Connection, and refresh the Port Necessarily. If you have sucessfully put your device into DFU mode, you will now see USB1 (or similar number) in the ports
  4. Click connect
  5. Switch to the 'Erasing & Programming' Section, load the firmware file path, and
  6. Start programming
  7. Disconnect and Reconnect The Button

Hardware

I've selected the STM32C071 as it has crystalless USB, is affordable with sufficient Flash, RAM and GPIO for potential extensions. It also has affordable dev kit STM32 nucleo-c071rb at $10 with USB-C.

Designed with Kicad, can be found under /pcb

The schematic and gerbers can be found under /pcb/output/

KNOWN BUGS

  1. The debug header silkscreen is reversed (gnd/3v3!)

Firmware

The project is built with STM32CubeIde

Main entrypoint can be found at The Buttoner/Core/Src/main
This is where the initialization generated by the STM32CubeMx IOC project happens,and also where we actually process the inputs

The second point is in The Buttoner/libs/gbmUSBdevice/USBdev/Src/usb_app.c, this is where we have the polled hook HIDUpdateKB which actually does the writing out to usb

The gbmUSBdevice library was slightly altered and linked into the project. See gbmUSBdevice for more details.

Todo

  1. Hardware

    1. [Not necessary] Add optional eeprom
    2. [DONE] Add hardware revision selector pins
    3. Add USB vid/pid selector (or do we just leave this in firmware?
    4. Add OpenHardware Logo
    5. Fix the debug header silkscreen
  2. Firmware

    1. [In progress] Add ondemand VCP to configure messages
    2. Apply for dedicated vid/pid from openmoko
    3. Cleanup startup so that button doesn't send messages when connected to usb
  3. Project

    1. Cleanup structure
    2. Tag versions

License

The project in it's entirety is released under GNU GPL V3, a copy of which can be found in ./LICENSE

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages