#macropad stuff

1 messages · Page 1 of 1 (latest)

blissful loom
#

get all the files from the zip

#

it should look like that:

#

remove the files in macros that you don't want

#

get the full lib directory

weary pollen
#

when I click the python 7x I only have lib, macros, code

blissful loom
#

yes, put that in

weary pollen
#

okay got those 3 drragged over

blissful loom
#

unless it's running 6.3.0 instead of 7, it should restart and show you something of the screen, and all that

#

just to check what version does boot_out.txt say, is it 6.3.0 or 7.0.0 ?

weary pollen
#

7

#

sad

#

as

#

d

#

and I can use the knob to scroll through diffrent options

blissful loom
#

each page is one of the files in macros

weary pollen
#

so if I delete one it will take it out of the list of macros on my pad?

blissful loom
#

yep

#

you can remove those you don't want, add your own (it might take a bit of work to get how that works)

#

you can change the order by changing the names of the files

weary pollen
#

so I have windows so I can delete all the linux and mac stuff

blissful loom
#

yup

#

if you want the numpad to be the default, you can put a "1" at the start of the file's name for example

weary pollen
#

and then I just need code on a note pad to add something new?

#

with the ""?

blissful loom
#

no

#

just the number

weary pollen
#

with a space?

#

so sorry im really new

blissful loom
#

juste any valid file name, they will appear in alphabetical order

#

with numbers first of course

#

not that with notepad you have to be careful with the file extension, it must be ".py", you might have to show file extensions in the file explorer options

weary pollen
#

I was using mu but I didnt get that

blissful loom
#

we advise using Mu in general

#

Mu would put the correct file extension, Notepad could add ".txt"

#

which makes things not work

weary pollen
#

so how would I go about adding a new function? just finding code and putting it into mu then saving it into the macro folder?

blissful loom
#

yeah, the best is probably to start by copying an existing one, and then modify it

weary pollen
#

yaaa idk how to modify lol. I've been trying to get this thing do do anything for 2 days now

#

MACROPAD Hotkeys example: Universal Numpad

from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values

app = { # REQUIRED dict, must be named 'app'
'name' : 'Numpad', # Application name
'macros' : [ # List of button macros...
# COLOR LABEL KEY SEQUENCE
# 1st row ----------
(0x202000, '7', ['7']),
(0x202000, '8', ['8']),
(0x202000, '9', ['9']),
# 2nd row ----------
(0x202000, '4', ['4']),
(0x202000, '5', ['5']),
(0x202000, '6', ['6']),
# 3rd row ----------
(0x202000, '1', ['1']),
(0x202000, '2', ['2']),
(0x202000, '3', ['3']),
# 4th row ----------
(0x101010, '', ['']),
(0x800000, '0', ['0']),
(0x101010, '#', ['#']),
# Encoder button ---
(0x000000, '', [Keycode.BACKSPACE])

#

so this is the numpad code. how would I change the color of each key

#

would it be the (0x202000

blissful loom
#

yes it's hexadecimal, for example 0x202000 is split into 20, 20, 00, or in decimal 32, 32, 0 which are the RGB values

weary pollen
#

so how do you figure out what values say pink would be

blissful loom
weary pollen
#

so if my color is 255, 0, 255

#

how would I type that into the code

blissful loom
#

for example here you would type "0xED96F9"

#

I think you can also give the color as a tuple like this instead of a number: (255, 0, 255)

weary pollen
#

(0x202000, '7', ['7'] so this is row one

#

would I jsut change it to (255x0255

#

or it needs to be 6 long?

blissful loom
#

no, you have to make it a single hexadecimal number, in this case 0xFF00FF because 255 is FF, but it's easier to copy the hexadecimal number given in a color picker

weary pollen
#

so I need to keep the 0x then the hex

blissful loom
#

or try ((255,0,255), "7", ["7"]), I believe it should work

weary pollen
#

so when I pick a color on the link you sent the #ff00ff

#

is the color but in words?

blissful loom
#

it's the color in hexadecimal, you replace the # with 0x

#

(html/css uses # for colors)

weary pollen
#

so it would look like (0xFFOOFF, '7'

blissful loom
#

yep

weary pollen
#

then I just click save on the note pad?

blissful loom
#

are those letter O's ? you want 0

weary pollen
#

okay just letter and numbers

blissful loom
#

it's an hexadecimal number, the digits are 0123456789ABCDEF

weary pollen
#

ohhh okay

#

(0xFF00FF, '7', ['7']),

#

so thats my new line of code

blissful loom
#

yup

#

when you save it will reload the code

weary pollen
#

MACROPAD Hotkeys example: Universal Numpad

from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values

app = { # REQUIRED dict, must be named 'app'
'name' : 'Numpad', # Application name
'macros' : [ # List of button macros...
# COLOR LABEL KEY SEQUENCE
# 1st row ----------
(0xFF00FF, '7', ['7']),
(0xFF00FF, '8', ['8']),
(0xFF00FF, '9', ['9']),
# 2nd row ----------
(0xFF00FF, '4', ['4']),
(0xFF00FF, '5', ['5']),
(0xFF00FF, '6', ['6']),
# 3rd row ----------
(0xFF00FF, '1', ['1']),
(0xFF00FF, '2', ['2']),
(0xFF00FF, '3', ['3']),
# 4th row ----------
(0xFF00FF, '', ['']),
(0xFF00FF, '0', ['0']),
(0xFF00FF, '#', ['#']),
# Encoder button ---
(0x000000, '', [Keycode.BACKSPACE])
]
}

#

holy crrap I did it

blissful loom
#

👍