Search found 11 matches

by Tomer
01 Jan 2016, 18:25
Forum: Workshop
Topic: RGB LED strip using Hasu's TMK code
Replies: 0
Views: 1934

RGB LED strip using Hasu's TMK code

Hi everyone, I'm building a custom keyboard, and for the programming part I just followed matt3o's guide: http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177.html I have no knowledge whatsoever in programming, so the guide helped me a lot! My keyboard is nearly fini...
by Tomer
13 Nov 2015, 16:30
Forum: Workshop
Topic: Activating a toggle LED using Hasu's TMK code.
Replies: 16
Views: 9166

You may have the LED wired the other way, i.e. pin --- LED --- resistor --- 5V, rather than pin --- LED --- resistor --- GND (as assumed for the above code). If that's the case, you need to change the first branch of the if statement to DDRD |= (1<<6); PORTD &= ~(1<<6); Other than this, I can't rea...
by Tomer
13 Nov 2015, 13:51
Forum: Workshop
Topic: Activating a toggle LED using Hasu's TMK code.
Replies: 16
Views: 9166

Modified from gh60 to use pin D6: void led_set(uint8_t usb_led) { if (usb_led & (1<<USB_LED_CAPS_LOCK)) { // output high DDRD |= (1<<6); PORTD |= (1<<6); } else { // Hi-Z DDRD &= ~(1<<6); PORTD &= ~(1<<6); } } Tried using this function but it didn't work when I turned on the caps lock key. Then I t...
by Tomer
13 Nov 2015, 10:42
Forum: Workshop
Topic: Activating a toggle LED using Hasu's TMK code.
Replies: 16
Views: 9166

Caps lock led is normally set in led.c, in the led_set function, just like in other keyboards (see e.g. gh60 example). The point is that the "toggled" led indicators (caps, num, scroll locks) are dealt with in the led_set function, while the "layer" leds in the led_layer_set function. I tried using...
by Tomer
13 Nov 2015, 09:17
Forum: Workshop
Topic: Activating a toggle LED using Hasu's TMK code.
Replies: 16
Views: 9166

In C, each function has to have a unique name - your code defines 2 functions with the same name. So, you'll need to combine the two LEDs into one function: void led_layer_set(uint32_t state) { DDRC |= (1<<7); DDRD |= (1<<5); /* Led for Layer 1 */ if ((1<<1 & state) != 0) { PORTC |= (1<<7); } else ...
by Tomer
12 Nov 2015, 21:58
Forum: Workshop
Topic: Activating a toggle LED using Hasu's TMK code.
Replies: 16
Views: 9166

Here's another way (there's a pull request about this on github: https://github.com/tmk/tmk_keyboard/pull/198 ) Namely: edit tmk_core/common/action_layer.c like this: - line 6, add #include "led.h" - line 66 (between 'layer_state = state;' and 'layer_debug(); dprintln();') add led_layer_set(state);...
by Tomer
11 Nov 2015, 11:05
Forum: Workshop
Topic: How to build your very own keyboard firmware
Replies: 711
Views: 389915

Halvar wrote: You're welcome! Does the keyboard work?
After a few days of programming and re-soldering what apparently was a non-functioning diode, the keyboard works perfectly!
Thanks again for the help.
Now I need to figure out how to program toggle LEDs on my two toggle function keys and on my CAPS lock key.
by Tomer
09 Nov 2015, 20:53
Forum: Workshop
Topic: How to build your very own keyboard firmware
Replies: 711
Views: 389915

Halvar wrote: F0 in your first layer is an undefined keycode. Maybe you mean FN0?

You can look up the available codes in the file /common/keycode.h
Yes!!!
That was my mistake - I wrote my function keys as "Fx" instead of "FNx"!

Thank you, Halvar!
by Tomer
09 Nov 2015, 20:41
Forum: Workshop
Topic: How to build your very own keyboard firmware
Replies: 711
Views: 389915

Is that with the unchenged source? The error message keymap_poker.c:8: error: 'KC_F0' undeclared here (not in a function) looks like a pretty normal error in your keymap_poker.c file. If this is your code and you don't find the error, post your poker.c file. Hey Halvar, thanks for your quick respon...
by Tomer
09 Nov 2015, 20:35
Forum: Workshop
Topic: How to build your very own keyboard firmware
Replies: 711
Views: 389915

Hi Tomer, welcome to DT! Yes, that's a known problem. Solution is here: http://www.avrfreaks.net/forum/windows-81-compilation-error Hi Halvar, thank you for your welcome! I tried the fix, and this is what I got: Microsoft Windows [Version 10.0.10240] (c) 2015 Microsoft Corporation. All rights reser...
by Tomer
09 Nov 2015, 19:34
Forum: Workshop
Topic: How to build your very own keyboard firmware
Replies: 711
Views: 389915

Hey, I keep getting these errors on the cmd when I compile, even when I try to compile the gh60 right from the source. Microsoft Windows [Version 10.0.10240] (c) 2015 Microsoft Corporation. All rights reserved. C:\Users\kagan>cd C:\Users\kagan\Desktop\tmk_keyboard-master\keyboard\gh60 C:\Users\kagan...

Go to advanced search