Skip to content
Snippets Groups Projects
Commit ef918672 authored by Daniel Friesel's avatar Daniel Friesel
Browse files

add dysfunctional ccs811 test app

parent c0b7a842
No related branches found
No related tags found
No related merge requests found
arch_drivers += ,i2c
drivers += ,ccs811
loop ?= 1
#include "arch.h"
#include "driver/gpio.h"
#include "driver/stdout.h"
#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(DRIVER_SOFTI2C)
#include "driver/i2c.h"
#else
#include "driver/soft_i2c.h"
#endif
#include "driver/ccs811.h"
void loop(void)
{
kout << "CCS811 status is " << ccs811.check() << endl;
}
int main(void)
{
arch.setup();
gpio.setup();
kout.setup();
if (i2c.setup() != 0) {
return 1;
}
kout << "I2C setup OK" << endl;
ccs811.init();
arch.idle_loop();
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment