This is the firmware for a sensor for measuring temperature, humidity, and CO2 an relaying it in a Protobuf message to a websocket.
To regenerate the schema, run this command:
mkdir -p lib/proto
python .pio/libdeps/nodemcuv2/Nanopb/generator/nanopb_generator.py -I proto -D lib/Proto proto/packet.proto
There is a compiler namespace DEFINE collision on atmelavr
platforms with the UENUM
type.
As a workaround, insert the following in packet.pb.h
:
/* Automatically generated nanopb header */
/* Generated by nanopb-0.4.2-dev */
#ifndef PB_PACKET_PB_H_INCLUDED
#define PB_PACKET_PB_H_INCLUDED
#include <pb.h>
#ifdef UENUM
#undef UENUM
#endif
etc