New answers tagged

-1

SOLVED By now, the only library I found allowing one to get data from DHT22 sensor without using a board is the already mentioned Adafruit Python library. The problem is that this library is deprecated and not updated to work with Raspberry Pi 4, so it does not recognize the RPi4 software. In order to solve it, I had to change the library a little and to ...


1

Uncork a nice bottle of wine. Push a small magnet into the cork (remembering to consume the wine before it goes sour). Use hot melt glue to attach a reed switch on the outer surface (at a corner of the container) at each desired sense level. Wire the reed switches to inputs of your microcontroller. Place the cork inside the container at the corner where you ...


0

I was originally using the relay method as described in the other answer, but you can do this with just 2 resistors. The key is having both the GPIO and the switch complete the circuit, but having a higher resistance on the GPIO. When the switch is triggered, since it has a lower resistance, it will draw the power away from the GPIO, triggering a state ...


1

Sounds like you want to read cpu temp. On raspberry pi os, this is as simple as reading the contents of /sys/class/thermal/thermal_zone0/temp Whether it's C or C#, you should be able to find a way to open a "file" for read only and read in the contents. Contents are a (human readable) base 10 string. The units are milli deg C. In other words, ...


1

Operating system aside, I'm inclined to believe the C# code you link to is .Net Framework which does not exist in Linux. There is .net core, but a quick glance seems to suggest the API is different. The cool thing is .net core works wonders on Raspberry Pi OS. In the last few versions, you don't even need to install anything. Just copy your executables and ...


Top 50 recent answers are included