I didn't remove any packages after full-upgrade and simply rebooted with a backup in place. After restart, I removed all obsolete packages but those which had unipi or axon in name (see later).
Currently, I'm still using the kernel from Buster because the kernel packages in Bullseye appear to be broken. If I understand correctly, we should be able to use unipi-kernel-modules-dkms with the normal Debian kernel. Unfortunately, it currently has broken dependencies, namely the unavailable unipi-kernel-headers and unipi-os-configurator-data.
Here is the list of obsolete Buster packages I have left on hold:
Hi @knebb, there are two approaches and you figured out both of them:
Do the calculation and write to register 2
Write a value to the register 3000. The value has to be 32bit signed integer.
I checked the documentation and I think there is a mistake with the registers 3000, 3001 and 3002. Those should be 3000, 3002 and 3004 since the 32bit values need two consecutive registers. I will check what is in the firmware and let you know!
@tomas_hora It really depends on the actual application. I needed to measure 50mm difference in water level in tight space (approx. 30mm x 30mm). So for me, mechanical solution was a no-go, since there are no such small sensors.
But for @knebb's purpose, some set of float switches (at the bottom, 1/4, 1/2, 3/4 and at the top) could be easy and affordable solution. I would connect them to a resistor ladder and 10V power supply thus converting the 5 states into evenly spreaded 0-10V which can be directly measured by UniPi's AI input. This could be better than occupying 5 DI inputs, if the number of DI's is also an issue.
Unfortunately the timing is too quick to be done by anything but a direct line to the CPU (Raspberry Pi/Arduino GPIOs are such a line to the CPU, which is why it works at all). As such it's not possible to use with Neuron or UniPi 1.1 out of the box. With some warranty-voiding modifications it may be possible to connect the device to an unused RPi GPIO, but I cannot recommend this action unless you are fully comfortable taking the risk and voiding the warranty. I also cannot provide instructions on doing so.
We use a modified kernel. You can use the commands
apt-mark hold raspberrypi-bootloader
apt-mark hold python-tornado
apt-mark hold raspberrypi-kernel
to prevent it being broken (also true for the Tornado webserver).
As a side note you should generally not do apt-get upgrade regularly on a non-desktop Linux system. 90%+ servers in the world do not do so to avoid precisely such issues. The same goes with any custom software. It's really only "safe" to do on a desktop with only standard packages, and even then it can sometimes break things. This is in fact the reason why Linux keeps older versions of packages in the repositories in the first place.
We plan to release packages, but all the above will still apply, functionally the differences will be
a) possibility to update UniPi software via apt
b) not needing to use the above commands manually (they will be instead done by the packages during installation)
You are of course welcome to compile the kernel yourself against any version which you wish, it's openly available in our repository.