we have good news!
All packages from the Unipi repository already have their version for Bullseye (Debian 11).
Unfortunately it took a little longer as it was not as easy as it first seemed, but now our packages can be used on all Unipi controllers with Debian 11.
We are now working on Bullseye OS images that we will release in the coming months. OS images will not be released immediately because we are working on a new unified approach to information about the controller and its peripherals.
For Unipi Neuron and Unipi 1.1 it is now possible to use the RaspberryPi OS image.
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.