I am using a Raspberry Pi3 and I’d like to know if there is an example of C program to test my DHT sensor using grovepi.c library.
Just want to make sure: are you using the GrovePi+ attached to the Raspberry Pi?
Yes I’m using the GrovePi+ attached to my RPI3 and the sensor is plugged through D5 port.
We already have a library written in
C++ - grove_dht_example.cpp
Please, pay attention to all the
headers you need before compiling the program.
If there’s anything unclear to how it should be run, please let us know and we’ll try to help you out.
It worked perfectly, I compiled the program and got my .out file.
I will be glad if you can do the same for C language.
Initially, we had a library written in
Then we moved on to
C++, because the language it’s much more powerful and it provides
If you have code written in
C, then you can compile it with
C++ is more strict with types, so you may need to tinker a little bit the
C code in order to be fully compatible.
Also, why would you want to write in
C instead of
Are there any specific requirements/conditions for your application?