Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: VMat on March 29, 2021, 11:59:30 AM

Title: DHT22 sensor
Post by: VMat on March 29, 2021, 11:59:30 AM
Hello,

Has anybody tried to read a DHT22 sensor from piCore? Any pointers on where to start? I see a topic here in the forum from 2016, but I'm wondering if there's something more straightforward after 4+ years.

The previous topic points to an article on Adafruit, but it seems to require a few libraries, and I'm not sure how to install them, as I can't find them in tinycore repo (with tce-ab) - kind of expected. Or maybe I did the wrong searches.

So again, I'd appreciate any pointers. Worst case, I can try to build my own low-level "driver" based on the sensor documentation I've found if there's nothing pre-built out there.

Thanks,

VMat
Title: Re: DHT22 sensor
Post by: bmarkus on March 29, 2021, 01:48:54 PM
It may help

https://pimylifeup.com/raspberry-pi-humidity-sensor-dht22/
Title: Re: DHT22 sensor
Post by: VMat on March 29, 2021, 02:31:20 PM
It may help

https://pimylifeup.com/raspberry-pi-humidity-sensor-dht22/


Cool! I'll try that, thanks!

VMat
Title: Re: DHT22 sensor
Post by: VMat on May 11, 2021, 02:00:47 PM
Finally got around to work on this again... I'll leave some notes here other newbies might find useful.

I've tried different things and haven't installed the OS from scratch in between, so maybe not all steps are covered here, because I can't remember everything I did from the start. Anyway, here are my high-level steps:


A note on #5: first I tried to call my script from bootlocal.sh, but it couldn't find Adafruit's module. Then I added it to .profile instead. It's working fine.

Thanks, @bmarkus, for the tip on that website!

Cheers,

VMat