Skip to content

Commit

Permalink
Add example description #169
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisxhe committed Oct 28, 2024
1 parent 90632a4 commit a4aef6e
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 9 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,15 @@
| HP303BSensor* |||||||
| SPIExample* |||||||
| PowerMonitoring ||| ❌(No support)[2] ||||
| SimHatAccelerometer ||| ❌(No support)[2] |[1] |||
| SimHatCurrentSensor ||| ❌(No support)[2] ||||
| SimHatOneWireSensor ||| ❌(No support)[2] ||||
| SimHatRelay ||| ❌(No support)[2] ||||
| SimHatAccelerometer[3] ||| ❌(No support)[2] |[1] |||
| SimHatCurrentSensor[3] ||| ❌(No support)[2] ||||
| SimHatOneWireSensor[3] ||| ❌(No support)[2] ||||
| SimHatRelay[3] ||| ❌(No support)[2] ||||

- HP303BSensor,SPIExample it only demonstrates how to define and use SPI and I2C. Please confirm the pin connection and IO definition before use.
- [1] T-A7608-ESP32 Conflict with Solar ADC
- [2] The relay driver conflicts with the board RST and cannot work
- [3] Requires external expansion board support [T-SimHat](https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v)

# Quick start ⚡

Expand Down
8 changes: 7 additions & 1 deletion examples/SimHatAccelerometer/SimHatAccelerometer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@
* @license MIT
* @copyright Copyright (c) 2024 ShenZhen XinYuan Electronic Technology Co., Ltd
* @date 2024-10-17
*
*/

// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v
// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v
// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v
// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v
// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v

#include <Arduino.h>
#include <Wire.h>
#include <SPI.h>
Expand Down
6 changes: 6 additions & 0 deletions examples/SimHatCurrentSensor/SimHatCurrentSensor.ino
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// REQUIRES the following Arduino libraries:
// - Adafruit INA219 Lib: https://github.com/adafruit/Adafruit_INA219
// - Adafruit Unified Sensor Lib: https://github.com/adafruit/Adafruit_Sensor
// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v
// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v
// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v
// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v
// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v

#include <Adafruit_Sensor.h>
#include <Adafruit_BusIO_Register.h>
#include <Adafruit_INA219.h>
Expand Down
6 changes: 6 additions & 0 deletions examples/SimHatOneWireSensor/SimHatOneWireSensor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
// - DHT Sensor Library: https://github.com/adafruit/DHT-sensor-library
// - Adafruit Unified Sensor Lib: https://github.com/adafruit/Adafruit_Sensor

// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v
// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v
// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v
// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v
// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v

#include <Adafruit_Sensor.h>
#include <Adafruit_BusIO_Register.h>
#include <DHT.h>
Expand Down
6 changes: 6 additions & 0 deletions examples/SimHatRelay/SimHatRelay.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
*
*/

// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v
// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v
// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v
// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v
// * @note Requires external expansion board support https://www.lilygo.cc/products/lilygo%C2%AE-t-simhat-can-rs485-relay-5v

#include <Arduino.h>

// T-A7670X SIM-Hat Pin
Expand Down
11 changes: 7 additions & 4 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
; default_envs = T-Call-A7670X-V1-1

;! SIM7672G and SIM7670G are exactly the same, except for the name change
; default_envs = T-SIM7672G
default_envs = T-SIM7672G

; https://www.lilygo.cc/products/t-a7608e-h
; default_envs = T-A7608X

default_envs = T-A7608X-S3
; default_envs = T-A7608X-S3

; default_envs = T-A7608X-DC-S3

Expand Down Expand Up @@ -72,22 +72,25 @@ default_envs = T-A7608X-S3
; src_dir = examples/HttpsBuiltlnGet
; src_dir = examples/HttpsBuiltlnPost
; src_dir = examples/MqttsBuiltlnEMQX
src_dir = examples/MqttsBuiltlnWill
; src_dir = examples/HttpsOTAUpgrade
; src_dir = examples/HP303BSensor
; src_dir = examples/SPIExample
; src_dir = examples/SendLocationFromSMS
; src_dir = examples/SendLocationFromSMS_Use_TinyGPS
; src_dir = examples/PowerMonitoring
; src_dir = examples/SimHatOneWireSensor
src_dir = examples/SimHatCurrentSensor
; src_dir = examples/SimHatCurrentSensor
; src_dir = examples/SimHatRelay
; src_dir = examples/SimHatAccelerometer


[env]
platform = espressif32
framework = arduino
; extra_scripts = ./script/pos_extra_script.py

monitor_speed = 115200


[esp32dev_base]
board = esp32dev
Expand Down

0 comments on commit a4aef6e

Please sign in to comment.