maa: Initial commit of maa, a python and nodejs I2C skeleton only
This commit is contained in:
11
examples/readi2c.cpp
Normal file
11
examples/readi2c.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "../src/maa.h"
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
maa::I2C i2c(28, 27);
|
||||
int addr = 0x62;
|
||||
char data[2];
|
||||
int ret = i2c.read(addr, data, 2);
|
||||
return ret;
|
||||
}
|
||||
Reference in New Issue
Block a user