This folder contains the implementation with a Heltec CubeCell.
For the backend setup please follow the instructions on the main readme
- Install the CubeCell framework in Arduino (Installation with Boards Manager)
- Copy the Template:
cp config.h.template config.h
. (This file is filled in with private data and should not be published) - Insert Application EUI (msb), Device EUI (msb) and App Key (msb) from the Device Overview in your TheThingsNetwork application to the
config.h
file. (Note: use the 'C-style' not Hex) This is still under development... - Optional: Change in
config.h
the way how to read sensordata (UART/A02YYUW or Trig/Echo) - Optional: Change the pins in
config.h
- Optional: Change cycle time in
config.h
- Upload sketch to your board by using the
CubeCell-Board (HTCC AB01)
from Cube Cell
If you are using Arduino IDE i have set following parameters in Tools:
- Connect
GND
of Sensor toGND
of Board - Connect VCC of Sensor to either
3V3
or5V
(if using a power pin, which is recommended, connect it to the corresponding pin in config, defaultVext
) - Connect
RX
of Sensor to PINGPIO1 (TX)
- Connect
TX
of Sensor to PINGPIO2 (RX)
Sensor Information (The example code only works with delay(100)
)
- Connect
GND
of Sensor toGND
of Board - Connect VCC of Sensor to either
3V3
or5V
(if using a power pin, connect it to the corresponding pin, defaultVext
) - Connect
Trig
of Sensor to PINGPIO5
- Connect
Echo
of Sensor to PINGPIO4
- To use full capacity of deep sleep you need to supply power over VDD (3.3V). By using USB connector the powerconsumption is a lot higher
- End all serial connections and power pins after use, so they will not drain power during consumption
- Using Vext as Power Pin, otherwise the board will not start with battery on VDD (3.3V) and sensor connected
- Board: active -> 30mA : deep sleep -> 3.3µA