The folder contains code for the Universal Ventilator project.
The hardware used in this project uses an Arduino Due. This project has been developed using VSCode and PlatformIO as an extension.
Both of the above are open source. Using PlatformIO with VSCode offers alot of flexibility, and also extensions for development and debugging.
Recommended: The firmware for this project is verly large and occupies almost 90% of the flash. Using the USB port to download and/or debug code is not recommended as it will take almost 2-3 minutes to upload code.
The recommended hardware to debug is the Segger J-Link Educational probe.
Connect the USB end of the J-Link to the PC and the 10-pin connector on the other end goes to the JTAG port on the Arduino Due.
Connect a USB cable between the PC and the USB connector away from the push button. This will give a serial port where print statements can be viewed and commands can be sent to the ventilator via a command set.
Install the latest VSCode for your architecture from code.visualstudio.com
Open VSCode and browse to the extensions tab(on the right side). Search for PlatformIO and install it.
If the Segger J-Link probe is being used, download and install the software for your architecture from Segger.
On Windows, if PlatformIO throws a Jlink.exe not found error, add the J-Link folder to the Path, under Environmental Variables.
Open VS code, click File->Open... and browse to the source/ folder. This should be the root folder for vscode to pick up the PlatformIO setup file(platformio.ini)
In order to build and upload, one of the PlatformIO build environments must be selected.
In the VSCode toolbar, the environment may be labelled as Default (Universal Ventilator)
.
To avoid confusion it is recommended to change your env from default.
The default option, uses the Programming Port
to upload to the Arduino.
Select this if using a JLink device. Provides faster upload through the JTag port, as well as PlatformIO debugging features
Click the plug icon in the bottom toolbar to open a serial monitor window.
Click the checkmark(✓) on the bottom toolbar to start a build
Select the right arrow(→) to upload code to the Arduino.
- Equation taken from data sheet https://sensing.honeywell.com/honeywell-sensing-trustability-ssc-series-standard-accuracy-board-mount-pressure-sensors-50099533-a-en.pdf
The images for the equations were created with https://www.codecogs.com/latex/eqneditor.php.