1- # Sensirion I2C SFA3X Arduino Library
1+ # Sensirion I²C SFA3X Arduino Library
22
3- This is the Sensirion SFA3X library for Arduino using the
4- modules I2C interface .
3+ This is the Sensirion SFA3X library for Arduino allowing you to
4+ communicate with a SFA3X sensor over I²C .
55
6- [ < center >< img src =" images/SFA3x .png " width =" 500px " ></ center > ] ( https://www.sensirion.com/my-sfa-ek )
6+ < img src =" images/sfa3x .png " width =" 300px " >
77
8- Click [ here] ( https://www.sensirion.com/my-sfa-ek ) to learn more about the SFA30
9- sensor and the SFA30 Evaluation Kit Board.
8+ Click [ here] ( https://sensirion.com/products/catalog/SEK-SFA30 ) to learn more about the Sensirion SFA3X sensor.
109
1110
12- # Installation
1311
14- To install, download the latest release as .zip file and add it to your
15- [ Arduino IDE] ( http://www.arduino.cc/en/main/software ) via
12+ The default I²C address of [ SFA3X] ( https://sensirion.com/products/catalog/SFA30 ) is ** 0x5D** .
1613
17- Sketch => Include Library => Add .ZIP Library...
1814
19- Don't forget to ** install the dependencies** listed below the same way via `Add
20- .ZIP Library`
2115
22- Note: Installation via the Arduino Library Manager is coming soon.
16+ ## Installation of the library
2317
24- # Dependencies
18+ This library can be installed using the Arduino Library manager:
19+ Start the [ Arduino IDE] ( http://www.arduino.cc/en/main/software ) and open
20+ the Library Manager via
2521
22+ ` Sketch ` ➔ ` Include Library ` ➔ ` Manage Libraries... `
23+
24+ Search for the ` Sensirion I2C SFA3X ` library in the `Filter
25+ your search...` field and install it by clicking the ` install` button.
26+
27+ If you cannot find it in the library manager, download the latest release as .zip file
28+ and add it to your [ Arduino IDE] ( http://www.arduino.cc/en/main/software ) via
29+
30+ ` Sketch ` ➔ ` Include Library ` ➔ ` Add .ZIP Library... `
31+
32+ Don't forget to ** install the dependencies** listed below the same way via library
33+ manager or ` Add .ZIP Library `
34+
35+ #### Dependencies
2636* [ Sensirion Core] ( https://github.com/Sensirion/arduino-core )
2737
38+ ## Connect the sensor
39+
40+ Use the following pin description to connect your SFA3X to the standard I²C bus of your Arduino board:
41+
42+ <img src =" images/sfa3x-pinout.png " width =" 300px " >
43+
44+ | * Pin* | * Cable Color* | * Name* | * Description* | * Comments* |
45+ | -------| ---------------| :------:| ----------------| ------------|
46+ | 1 | red | VDD | Supply Voltage | 3.15V to 5.5V
47+ | 2 | black | GND | Ground |
48+ | 3 | green | SDA | I2C: Serial data input / output |
49+ | 4 | yellow | SCL | I2C: Serial clock input |
50+ | 5 | blue | SEL | Interface select | Pull to GND to select I2C (leaving it floating selects UART)
51+
52+
53+
54+
55+ The recommended voltage is 3.3V.
56+
57+ ### Board specific wiring
58+ You will find pinout schematics for recommended board models below:
59+
60+
61+
62+ <details ><summary >Arduino Uno</summary >
63+ <p >
64+
65+ | * SFA3X* | * SFA3X Pin* | * Cable Color* | * Board Pin* |
66+ | :---: | --- | --- | --- |
67+ | VDD | 1 | red | 3.3V |
68+ | GND | 2 | black | GND |
69+ | SDA | 3 | green | D18/SDA |
70+ | SCL | 4 | yellow | D19/SCL |
71+ | SEL | 5 | blue | GND |
72+
73+
74+
75+ <img src =" images/Arduino-Uno-Rev3-i2c-pinout-3.3V-SEL.png " width =" 600px " >
76+ </p >
77+ </details >
78+
79+
80+
81+
82+ <details ><summary >Arduino Nano</summary >
83+ <p >
84+
85+ | * SFA3X* | * SFA3X Pin* | * Cable Color* | * Board Pin* |
86+ | :---: | --- | --- | --- |
87+ | VDD | 1 | red | 3.3V |
88+ | GND | 2 | black | GND |
89+ | SDA | 3 | green | A4 |
90+ | SCL | 4 | yellow | A5 |
91+ | SEL | 5 | blue | GND |
92+
93+
94+
95+ <img src =" images/Arduino-Nano-i2c-pinout-3.3V-SEL.png " width =" 600px " >
96+ </p >
97+ </details >
2898
29- # Quick Start
3099
31- 1 . Connect the SFA3X Sensor to your Arduino board's standard
32- I2C bus. Check the pinout of your Arduino board to find the correct pins.
33- The pinout of the SFA3X Sensor board can be found in the
34- data sheet.
35100
36- * **VDD** of the SEK-SFA3X to the **3.3V** of your Arduino board (5V is also possible)
37- * **GND** of the SEK-SFA3X to the **GND** of your Arduino board
38- * **SCL** of the SEK-SFA3X to the **SCL** of your Arduino board
39- * **SDA** of the SEK-SFA3X to the **SDA** of your Arduino board
40- * **SEL** of the SEK-SFA3X to another **GND** of your Arduino board
41101
42- 2 . Open the ` exampleUsage ` sample project within the Arduino IDE
102+ <details ><summary >Arduino Micro</summary >
103+ <p >
43104
44- File => Examples => Sensirion I2C Sfa3x => exampleUsage
105+ | * SFA3X* | * SFA3X Pin* | * Cable Color* | * Board Pin* |
106+ | :---: | --- | --- | --- |
107+ | VDD | 1 | red | 3.3V |
108+ | GND | 2 | black | GND |
109+ | SDA | 3 | green | D2/SDA |
110+ | SCL | 4 | yellow | ~ D3/SCL |
111+ | SEL | 5 | blue | GND |
45112
46- 3 . Click the ` Upload ` button in the Arduino IDE or
47113
48- Sketch => Upload
114+
115+ <img src =" images/Arduino-Micro-i2c-pinout-3.3V-SEL.png " width =" 600px " >
116+ </p >
117+ </details >
118+
119+
120+
121+
122+ <details ><summary >Arduino Mega 2560</summary >
123+ <p >
124+
125+ | * SFA3X* | * SFA3X Pin* | * Cable Color* | * Board Pin* |
126+ | :---: | --- | --- | --- |
127+ | VDD | 1 | red | 3.3V |
128+ | GND | 2 | black | GND |
129+ | SDA | 3 | green | D20/SDA |
130+ | SCL | 4 | yellow | D21/SCL |
131+ | SEL | 5 | blue | GND |
132+
133+
134+
135+ <img src =" images/Arduino-Mega-2560-Rev3-i2c-pinout-3.3V-SEL.png " width =" 600px " >
136+ </p >
137+ </details >
138+
139+
140+
141+
142+ <details ><summary >ESP32 DevKitC</summary >
143+ <p >
144+
145+ | * SFA3X* | * SFA3X Pin* | * Cable Color* | * Board Pin* |
146+ | :---: | --- | --- | --- |
147+ | VDD | 1 | red | 3V3 |
148+ | GND | 2 | black | GND |
149+ | SDA | 3 | green | GPIO 21 |
150+ | SCL | 4 | yellow | GPIO 22 |
151+ | SEL | 5 | blue | GND |
152+
153+
154+
155+ <img src =" images/esp32-devkitc-i2c-pinout-3.3V-SEL.png " width =" 600px " >
156+ </p >
157+ </details >
158+
159+
160+
161+ ## Quick Start
162+
163+ 1 . Install the libraries and dependencies according to [ Installation of the library] ( #installation-of-the-library )
164+
165+ 2 . Connect the SFA3X sensor to your Arduino as explained in [ Connect the sensor] ( #connect-the-sensor )
166+
167+ 3 . Open the ` exampleUsage ` sample project within the Arduino IDE:
168+
169+ ` File ` ➔ ` Examples ` ➔ ` Sensirion I2C SFA3X ` ➔ ` exampleUsage `
170+
171+
172+
173+ 5 . Click the ` Upload ` button in the Arduino IDE or ` Sketch ` ➔ ` Upload `
49174
501754 . When the upload process has finished, open the ` Serial Monitor ` or `Serial
51176 Plotter` via the ` Tools` menu to observe the measurement values. Note that
52- the ` Baud Rate ` in the corresponding window has to be set to ` 115200 baud ` .
177+ the ` Baud Rate ` in the used tool has to be set to ` 115200 baud ` .
53178
54- # Contributing
179+ ## Contributing
55180
56181** Contributions are welcome!**
57182
58- We develop and test this driver using our company internal tools (version
59- control, continuous integration, code review etc.) and automatically
60- synchronize the master branch with GitHub. But this doesn't mean that we don't
61- respond to issues or don't accept pull requests on GitHub. In fact, you're very
62- welcome to open issues or create pull requests :)
63-
64183This Sensirion library uses
65184[ ` clang-format ` ] ( https://releases.llvm.org/download.html ) to standardize the
66185formatting of all our ` .cpp ` and ` .h ` files. Make sure your contributions are
@@ -74,7 +193,8 @@ clang-format -i src/*.cpp src/*.h
74193
75194Note that differences from this formatting will result in a failed build until
76195they are fixed.
196+ :
77197
78- # License
198+ ## License
79199
80- See [ LICENSE] ( LICENSE ) .
200+ See [ LICENSE] ( LICENSE ) .
0 commit comments