Skip to content

Commit

Permalink
Updated sample headers to add some little doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieucarbou committed Mar 1, 2024
1 parent 9e5a083 commit 6f6dbdb
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 39 deletions.
10 changes: 10 additions & 0 deletions examples/EnergyReset/EnergyReset.ino
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* This example shows how to reset the energy counter of the PZEM004Tv3
* when the energy consumed is greater than 0.002 kWh.
*
* The circuit:
* - PZEM004Tv3 connected to Serial1 (RX=27, TX=14)
*
* Compile with -D MYCILA_PZEM_JSON_SUPPORT to enable JSON support
* Add ArduinoJson library to your project
*/
#include <Arduino.h>
#include <ArduinoJson.h>
#include <MycilaPZEM004Tv3.h>
Expand Down
10 changes: 10 additions & 0 deletions examples/EnergyResetAsync/EnergyResetAsync.ino
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* This example shows how to reset the energy counter of the PZEM004Tv3
* when the energy consumed is greater than 0.002 kWh.
*
* The circuit:
* - PZEM004Tv3 connected to Serial1 (RX=27, TX=14)
*
* Compile with -D MYCILA_PZEM_JSON_SUPPORT to enable JSON support
* Add ArduinoJson library to your project
*/
#include <Arduino.h>
#include <ArduinoJson.h>
#include <MycilaPZEM004Tv3.h>
Expand Down
9 changes: 9 additions & 0 deletions examples/Read/Read.ino
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* This example shows how to read the energy data of a PZEM004Tv3
*
* The circuit:
* - PZEM004Tv3 connected to Serial1 (RX=27, TX=14)
*
* Compile with -D MYCILA_PZEM_JSON_SUPPORT to enable JSON support
* Add ArduinoJson library to your project
*/
#include <Arduino.h>
#include <ArduinoJson.h>
#include <MycilaPZEM004Tv3.h>
Expand Down
9 changes: 9 additions & 0 deletions examples/ReadAsync/ReadAsync.ino
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* This example shows how to read the energy data of a PZEM004Tv3
*
* The circuit:
* - PZEM004Tv3 connected to Serial1 (RX=27, TX=14)
*
* Compile with -D MYCILA_PZEM_JSON_SUPPORT to enable JSON support
* Add ArduinoJson library to your project
*/
#include <Arduino.h>
#include <ArduinoJson.h>
#include <MycilaPZEM004Tv3.h>
Expand Down
11 changes: 11 additions & 0 deletions examples/ReadAsyncMulti/ReadAsyncMulti.ino
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* This example shows how to read the energy data of several PZEM004Tv3 devices on the same Serial port.
* PZEM have to be assigned addresses before using this example.
*
* The circuit:
* - PZEM004Tv3 #1 connected to Serial1 (RX=27, TX=14)
* - PZEM004Tv3 #2 connected to Serial1 (RX=27, TX=14)
*
* Compile with -D MYCILA_PZEM_JSON_SUPPORT to enable JSON support
* Add ArduinoJson library to your project
*/
#include <Arduino.h>
#include <ArduinoJson.h>
#include <MycilaPZEM004Tv3.h>
Expand Down
8 changes: 8 additions & 0 deletions examples/Search/Search.ino
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This example shows how to search for PZEM004Tv3 devices on the same Serial port.
* PZEM have to be assigned addresses before using this example.
*
* The circuit:
* - PZEM004Tv3 #1 connected to Serial1 (RX=27, TX=14)
* - PZEM004Tv3 #2 connected to Serial1 (RX=27, TX=14)
*/
#include <Arduino.h>
#include <MycilaPZEM004Tv3.h>

Expand Down
6 changes: 6 additions & 0 deletions examples/SetAddress/SetAddress.ino
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This example shows how to set an address to a PZEM004Tv3 device.
*
* The circuit:
* - PZEM004Tv3 connected to Serial1 (RX=27, TX=14)
*/
#include <Arduino.h>
#include <MycilaPZEM004Tv3.h>

Expand Down
38 changes: 0 additions & 38 deletions examples/SetAddressMulti/SetAddressMulti.ino

This file was deleted.

1 change: 0 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ lib_dir = .
; src_dir = examples/EnergyReset
; src_dir = examples/EnergyResetAsync
src_dir = examples/SetAddress
; src_dir = examples/SetAddressMulti
; src_dir = examples/Search
default_envs = esp32
; default_envs = esp32s3box
Expand Down

0 comments on commit 6f6dbdb

Please sign in to comment.