Made a custom board for patch sm. Using a custom json for extra pins. Couldn’t get gate outs to work so far, but that’s another story. Had success with switches though. Leds give me error on compile…
“oopsy-verbose: “Untitled1_patch_mine.cpp:61:48: error: no matching function for call to ‘daisy::Led::Init(const dsy_gpio_pin&)’”
oopsy-verbose: " 61 | led1.Init(daisy::patch_sm::DaisyPatchSM::D8), true);”
"
The text I’ve added to Json is very straightforward…
“led1”: {
“component”: “Led”,
“pin”: “D8”
}
In the .cpp file in the build folder lines have been generated, but first line looks strange to me, ie 1 open bracket and 2 closed ones.
I managed to get an LED flashing today with some edits to the patch sm related files in libdaisy. and by using a gate out. I wonder if I’m picking up the wrong resources somehow, but anyway it works now as far as I can tell, so I think I have what I need.
I get the feeling maybe the seed is further on in terms of implementation for custom pins than the patch_sm? If anybody needs more details let me know. Or if you know why I’m an idiot and how I can do it all in just the json, I’d love to know that also
No that’s definitely a bug! Thanks for posting those details. I’ve made a patch which should be merged into the codebase soon to fix this (simply removing that extra bracket). If you want the Led component to work on your local Oopsy in the meantime, you could just remove that bracket yourself in the component_defs_patchsm.json file.
after “{pin}” the closed bracket shouldnt be there. Remove that and it works.
However I have to say that I could then compile ok, but my Leds didnt flash. Also I couldnt get gate outs to work originally but I found a little hack now, so I use gate_outs for Leds anyway. The need for the hack could be due to me not doing something else properly though (as a newb), so I would suggest if you need to access any of the addtional digital IO, then go through the route described by the Oopsy creator guys (I search for oopsy custom json) and if that doesn’t work, then let me know. Creating new “Switches” in a custom json worked fine for me and gave me no trouble at all by the way.