2023-02-20 - upcoming choices of significance
i played a bit over the weekend with the pwm to analog voltage converters, and that looks like they'll do the job fine. i was a bit lazy in that i used the square wave generator on the synthesizer as the pwm source. it was right there and gives me both frequency and pulse width controls. testing with rpi gpio would have meant more wires and writing a bit of code. i really just wanted to make sure these behave like i think they do, and that went just fine
but code will have to come soon, that's where this project will start producing really interesting results, it's kinda the whole point. there's several functions i intend to have, and it'd be best that the control functions all happen in a common set of code. that should make it easier to coordinate between all functions, whether they use the labrador's ports or rpi gpio
much of this decision rotates around the labrador and its software, which is written in c++. i'm pretty good with python, i don't mind c, but i haven't touched c++ since the mid 90s. modern c++ code always seems loaded with a bunch of stuff that makes it hard, as an inexperienced outsider, to figure out what's actually going on
thankfully, the author of the labrador software has cleanly segregated the hardware control functions from the user interface. the former is implemented in a library that is then used by the ui. this gives us a few options for building a custom control system and ui:
- use the c++ lib from python
- use the c++ lib from c
- write in c++
the first two would require some interop stuff to support the cross language usage. i've never done it for either, but my initial googling suggests both are possible. using the c++ lib in c may require dropping some more headers into the c++ code, whereas i can probably do the python interop just from python. i should probably explicitly test that last part
i'd like to do everything in python including the ui, but i recognize i may be setting myself up for perf problems later on if i'm expecting python to precisely control multiple gpio's at rates up to a few kilohertz while also doing ui rendering on an rpi. so i recognize i might need to do a lot of this in c anyway. hm
much to think about
back to blog index
back to jattdb.com