From ce472c68e60cbb9fd36a6f54e1246ca4070f9e5a Mon Sep 17 00:00:00 2001 From: Hays Chan <25737801+hayschan@users.noreply.github.com> Date: Wed, 27 Dec 2023 15:23:03 +0800 Subject: [PATCH] Update README.md with simulator details --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2d8d516..1897e47 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,19 @@ See [XGZF4000 online datasheet](https://cfsensor.com/wp-content/uploads/2022/11/ In addition to the online version of the XGZF4000 Air Flow Sensor datasheet, an [archived copy](/docs/XGZF4000-Air-Flow-Sensor-V2.2.pdf) is also available within the repository. This archived version can be found at the location `./docs/XGZF4000-Air-Flow-Sensor-V2.2.pdf`. This ensures that users have access to the datasheet even in offline scenarios or if the online version becomes unavailable. -## Operation modes +## Using the driver + +### Operation modes New data from XGZF4000 can be obtained in Polling modes. > Note: The user is responsible for initialization and configuration of I2C bus. -### Polling mode -After calling `xgzf4000_new_sensor()`, the user is responsible for periodically reading the air flow data from XGZF4000. \ No newline at end of file +After calling `xgzf4000_new_sensor()`, the user is responsible for periodically reading the air flow data from XGZF4000. + +## Simulator + +To simulate this project, install [Wokwi for VS Code](https://marketplace.visualstudio.com/items?itemName=wokwi.wokwi-vscode). Open the project (at `./simulation`) directory in Visual Studio Code, press **F1** and select "Wokwi: Start Simulator". + +> Please note that Wokwi for VS Code is a commercial product and requires a license after a free trial period. + +You may also use the online Wokwi simulator with [this sample project](https://wokwi.com/projects/385249858064235521).