Close

It lives! ... but not for long

A project log for hctrl

Yet another Ikea stand-up table controller.

rikardonmrikardonm 03/11/2022 at 11:000 Comments

https://codeql.github.comBefore the "go nuts and change everything" the LCD was actually working, so I knew that the driver was (mostly) a‑ok. Reviewing the code a few times didn't raise any suspicions, so down the logic analyzer route we went.

After hooking up to the LCD's signals, it was clear that the CE line was not being driven properly and that there was no actual text payload being sent to the device! If I'd only hooked the the thing up earlier.

Now, the investigation on why there was no data being sent was done with the platformio plugin in vscode, easily allowing debugging of the program with a chinesium st-linkv2 clone. As it turns out, I had screwed up my array implementation (that everybody says one should not do), and it was not storing the pushed data.

Solving both the CE and the array issue, the LCD was again alive! Obviously that the first sign of life from it must be the azevem icon.

Nightly LCD debugging session

With that win under my belt, incentive to touch up other things and change even more stuff took over. Unfortunately, that work wasn't completed, being itself interrupted by another task: publishing the (broken) software written up to this point.

As with every love story, the plan was to review the entire code, get the repo in a stable buildable state, add license headers to source files, standardize on a code style, the whole 9 yards. 

But the "nah, that can be done never later, let's just go with the simplest and get it done" was taken. To be honest, I now think it was actually the better route anyway. The code lives in https://github.com/rikardonm/hctrl.

While setting up the repo, I remembered one thing I saw a few months back and wanted to try: CodeQL (https://codeql.github.com). My current simplified version of it is: a tool that analyses code based on a set of rules, ranking its quality or compliance. I don't know much about the inner workings or options that CodeQL has, but I know that it can be powerful. This was actually a point for using github instead of gitlab, as for they offer really similar features (at least for me, now).

As expected, the "publish the code" intermission, appended by the "let's try this new thing I saw" leaves us in the current state: https://github.com/rikardonm/hctrl/actions/runs/1968193857

Broken code.

But hey, we have now a free build test!

Discussions