Need Help with QMK, MagicForce MF68 Oddball Rebuild

starhawk

13 Jan 2019, 18:06

I hope ya'll are a bit friendlier than the "QMK official forums" on Reddit, where I was roundly ignored.

I have an unmodified MagicForce MF68. I wish to modify it in an unusual way. I have determined that this method of modification is the easiest and cheapest way for me to do it, and I would strongly prefer advice on how to proceed, rather than advice on alternative methods. Please trust me when I say that I know what I'm doing and I have my reasons for doing this the way I want to do this.

What I want to do is replace the controller chip by removing it and bodging wires onto existing switch and diode solder joints to a Teensy LC. I also want to add two rotary encoders and an LED. The backlight I would like to switch manually with a toggle switch, simply to save on Teensy connection requirements. (I don't need fancy backlight modes like breathing effects or what-have-you anyways, and this is a single-color warm white backlight.)

I would like to use the QMK firmware along with my Teensy. However, I do not know enough -- being primarily a hardware person -- to really achieve this on my own. I have attached what I have so far.

Right now, I have at least two questions.

(1) How do I enumerate Teensy LC pins to QMK? I received a little card with pin numbers on it for Arduino and for other programming languages, with the 'other' being simple numbers (0,1,2,3) silkscreened on the bottom of the Teensy LC PCB. How do I match those numbers up with what QMK expects (presumably A1 B2 etc where the letter is the port and the number is the pin within the port)...?

(2) Are there any *missing* files I need to add, to make it work, and what should those files contain?
Attachments
mf68_starhawk.zip
My current QMK keyboard firmware, uncompiled.
(10.16 KiB) Downloaded 9 times

User avatar
Hypersphere

13 Jan 2019, 20:56

If you haven't done so already, I'd suggest checking QMK on GitHub and Geekhack. In addition, search Google for pin assignments for the Teensy and your keyboard. You might also check TMK as a potential alternative to QMK.

I'd also suggest posting your code within your DT post using the code display feature in DT. People might be disinclined to download a file containing code.

You are probably already aware of replacement PCBs for tne MagicForce 68; I presume you don't want to go that route.

Sorry I cannot be of more direct help!

User avatar
Muirium
µ

13 Jan 2019, 21:06

Yes, I wouldn’t blame a forum for lack of progress on a question like this. In reality, few people indeed understand the ins and outs of TMK and its derivatives enough to assist. Many of us, like me, just can’t code beyond the most trivial of tasks.

starhawk

13 Jan 2019, 21:17

Re code complexity... fair enough. I didn't know that.

Re the Teensy itself. I've already been to visit The Great Goog, as that's almost always my first stop, and he wasn't very helpful.

Re posting code, the problem is that there are multiple files to post, and I don't even know that I've got all the files I need, present. The MF68 code that's there is tailored to an Arduino Pro Micro, but I need more inputs than that PCB can provide. That's why I'm using a Teensy. I'm using the LC version because I need to keep things extremely inexpensive. I posted a ZIP archive of the complete fileset that I've been working with so far.

Would it be better for me to email one of the QMK developers directly, and if so, which one?

User avatar
swampangel

14 Jan 2019, 02:16

Have you tried the QMK "onekey" demo project? https://github.com/qmk/qmk_firmware/blo ... uctions.md

This should have the steps you need to build and flash the firmware to your Teensy LC for the first time.

Many/most of the build logs, configs, etc that you find online will be assuming an ATMega32u4 or similar (Teensy 2.0, Pro Micro) and won't be useful for the ARM Cortex on the Teensy LC without adaptation.

At a glance, the wiki page I linked above has a note about pin numbers. It sounds like you reference the pins using the format "TEENSY_PINn_IOPORT" where n is 0-23 as shown at https://www.pjrc.com/teensy/teensyLC.html -- but I don't have a Teensy LC so I can't try it out. You should be able to modify the onekey project to confirm this assumption.

If you're able to do that then you should be in better shape to modify the MF68 source to your needs, or at least to ask more directed questions.

starhawk

14 Jan 2019, 07:00

TBH I can't make heads or tails of the OneKey project.

User avatar
swampangel

14 Jan 2019, 13:33

The onekey project is a "keyboard" that only has one key -- you can flash it to your board, and then generate a keystroke by shorting two of the pins on the teensy together.

The documentation includes all the steps you need to install the toolchain, make the firmware, and flash it.

If you want some help, you are going to have to tell us what you tried, and at what point you stopped.

User avatar
Darkshado

14 Jan 2019, 16:23

For shorter questions the code formatting feature here is fine, but for uploading all your sources, keeping track of your changes and so on, my recommendation is that your familiarize yourself with Git and GitHub. This way you can push your branch to GitHub and anyone interested can look at it there.

starhawk

14 Jan 2019, 19:45

What threw me about the OneKey project is that it doesn't seem to define any pins -- or, at least, I couldn't figure out where the pin definitions were.

I would like to get known good code before I start bodging wires and such, so as to avoid the otherwise inevitable "is it software or is it hardware" troubleshooting trap-debate.

User avatar
swampangel

14 Jan 2019, 21:36

https://github.com/qmk/qmk_firmware/blo ... y/matrix.c

See the methods with "col" and "row" in the name.

You can flash it and try it out on your LC without any soldering.

starhawk

15 Jan 2019, 03:53

I think I may just buy a Teensy 2.0 and make it that much more simple. I have to leave on a trip on Saturday, anyways, so it's not like I really have much time to further poke around with this before then.

Post Reply

Return to “Keyboards”