Programming Macros for Ergodox

The default configuration tool on Input Club or Massdrop don’t allow for macro programming. So you will have to get your hands dirty and mess with the firmware code a little. It’s not hard.

  1. Run the following commands on your terminal to clone Ben Blazak’s firmware code from github and create a custom layout for yourself

  2. Open keyboard/ergodox/options.mk and add qwerty–custom to the KEYBOARD_LAYOUTS and change the KEYBOARD_LAYOUT to qwerty–custom. The keyboard layout will look something like this :

  3. Edit keyboard/ergodox/layout/fragments/macros.part.h and create a function for your macro. As an example, we will do a macro that prints b4.

  4. Now that the macro is ready, it can be placed in the layout. Put m_b4 for whichever key you want the macro to trigger. Edit firmware/keyboard/ergodox/layouts/qwerty–custom.c and put your macro in it.

  5. In the terminal, run make It will create firmware.hex
    Upload the file to Ergodox and your macro will be ready for use.

You can look up the hex codes for keys here: http://www.usb.org/developers/hidpage/Hut1_12v2.pdf

The new light sensor

In my last post, I spoke about creating a light sensing “widget” that I could attach to my projects. I used a 10k resistor and was reading the light readings off of the analog pin on Arduino. However, I noticed that attaching an LED to the circuit was throwing the readings way off.

so, I found another way of calculating brightness. I found this article which talked about using a capacitor attached to the photocell which is in turned attached to a digital pin on Arduino. I was able to attach an LED without throwing off my readings a lot. While I was making these modifications, I also decided to make some other improvements (like getting an LED holder to hold my power indicator)

Here’s a pic:

The new light sensor

If you guys are looking for an informative tutorial on how to use a photocell, I found this article very helpful: http://learn.adafruit.com/photocells/using-a-photocell