wire & sht2x
This commit is contained in:
parent
b5fd254c00
commit
7b7e940654
@ -1,4 +1,4 @@
|
||||
#include "MikuDuino.h"
|
||||
#include <MikuDuino.h>
|
||||
#include "MikuRelay.h"
|
||||
|
||||
/*
|
||||
|
||||
@ -41,6 +41,11 @@ sudo ./blink
|
||||
+-----+-----+---------+------+---+- BPI-M3 -+---+------+---------+-----+-----+
|
||||
</code></pre>
|
||||
|
||||
1.(2016-05-30) start & sayhello
|
||||
2.(2016-06-02) gpio for M2+,M3 & blink
|
||||
3.(2016-06-04) update to C++ & add Relay
|
||||
4.(2016-06-05) add Wire & SHT2x
|
||||
|
||||
git add .
|
||||
git commit -a -m "md"
|
||||
git push origin master
|
||||
|
||||
BIN
examples/sht2x
Executable file
BIN
examples/sht2x
Executable file
Binary file not shown.
27
examples/sht2x.cpp
Executable file
27
examples/sht2x.cpp
Executable file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* sht2x.cpp:
|
||||
*
|
||||
* Welcome to MikuQ.com! MikuDuino for BananaPi
|
||||
*
|
||||
* by MikuQ(i@mikuq.com) 2016-6-5
|
||||
*
|
||||
* https://github.com/bpiq/MikuPi
|
||||
*
|
||||
*/
|
||||
|
||||
#include "MikuDuino.h"
|
||||
#include "MikuSHT2x.h"
|
||||
|
||||
Miku_SHT2x sht;
|
||||
|
||||
void setup()
|
||||
{
|
||||
sayHello();
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
printf("Humidity(%%RH): %.2f", sht.GetHumidity());
|
||||
printf(" Temperature(C): %.2f\n", sht.GetTemperature());
|
||||
delay(1000);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user