Week Review 1/4/2024

Learning Go

I started the week by learning the Go Programming language. I thought it might be interesting because it is a more modern programming language than I am used to using. I used the Go by example set of guides to learn it and I found it interesting, I want to use it on the back end of my next project.

Fixing the Typewriter

Mr. Christy reversed engineered an electric typewriter over the course of the last few years. The typewriter would type out the contents of whatever someone would text to a phone number. Unfortunately it broke a couple of months ago, and Mr. Christy wanted my help to figure out why and fix it.

image of typewriter

Twilio

We are using Twilio to receive the texts. Twilio has a very user friendly API that can interact with Webhooks. The typewriter is using flask to accept web requests and then type out the contents of the message.

Unfortunately the school firewall does not allow any traffic to dial in. We are able to interact with servers locally but not externally. To get around this we decided to use ngrok.

It turned out that our account had run out of money, we added $20 and set up some triggers so that no students spam the keyboard and incur a large cost.

This also means that the phone number changed, so we will have to distribute a new one.

Ngrok

Ngrok is a user friendly software as a service reverse proxy. It allows you to dial out to their servers where they will forward traffic back to you. We are hosting our web server locally then connecting to it using Ngrok.

Increasing Reliability

The software was being run without any containerization. This caused some reliability problems and makes it much less portable in the event we need to migrate Raspberry Pis. I started making a docker container using this guide

Docker logo

The container needs to to be run using privilaged mode because it needs to communicate with serial devices. Unfortunately when I try to build the container it gives me this error. I will need to troubleshoot it tomorrow before I return to the float project.

278.4
278.4         pip subprocess to install backend dependencies did not run successfully.
278.4         exit code: 1
278.4         [44 lines of output]
278.4             Collecting ninja>=1.8.2
278.4               Downloading ninja-1.11.1.1.tar.gz (132 kB)
278.4                  132.4/132.4 kB 17.2 kB/s eta 0:00:00
278.4               Installing build dependencies: started
278.4               Installing build dependencies: finished with status 'done'
278.4               Getting requirements to build wheel: started
278.4               Getting requirements to build wheel: finished with status 'done'
278.4               Preparing metadata (pyproject.toml): started
278.4               Preparing metadata (pyproject.toml): finished with status 'done'
278.4             Collecting patchelf>=0.11.0
278.4               Downloading patchelf-0.17.2.1-py2.py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl (381 kB)
278.4                  381.1/381.1 kB 2.6 MB/s eta 0:00:00
278.4             Building wheels for collected packages: ninja
278.4               Building wheel for ninja (pyproject.toml): started
278.4               Building wheel for ninja (pyproject.toml): finished with status 'error'
278.4               error: subprocess-exited-with-error
278.4
278.4               Building wheel for ninja (pyproject.toml) did not run successfully.
278.4               exit code: 1
278.4               [15 lines of output]
278.4                   /tmp/pip-build-env-xqg08b8g/overlay/lib/python3.12/site-packages/setuptools_scm/git.py:308: UserWarning: git archive did not support describe output
278.4                     warnings.warn("git archive did not support describe output")
278.4                   /tmp/pip-build-env-xqg08b8g/overlay/lib/python3.12/site-packages/setuptools_scm/git.py:327: UserWarning: unprocessed git archival found (no export subst applied)
278.4                     warnings.warn("unprocessed git archival found (no export subst applied)")
278.4                   Traceback (most recent call last):
278.4                     File "/tmp/pip-build-env-xqg08b8g/overlay/lib/python3.12/site-packages/skbuild/setuptools_wrap.py", line 645, in setup
278.4                       cmkr = cmaker.CMaker(cmake_executable)
278.4                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
278.4                     File "/tmp/pip-build-env-xqg08b8g/overlay/lib/python3.12/site-packages/skbuild/cmaker.py", line 148, in __init__
278.4                       self.cmake_version = get_cmake_version(self.cmake_executable)
278.4                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
278.4                     File "/tmp/pip-build-env-xqg08b8g/overlay/lib/python3.12/site-packages/skbuild/cmaker.py", line 105, in get_cmake_version
278.4                       raise SKBuildError(msg) from err
278.4
278.4                   Problem with the CMake installation, aborting build. CMake executable is cmake
278.4                   [end of output]
2