I am quite excited about today's post as it's my first complete Arduino Library for Proteus. In today's tutorial, I am going to share a new Arduino Library for Proteus. You'll find lots of good tutorial movies in the video library and you can access technical brochures and the demo version from the downloads page. Learn more about the Proteus product range via the resource links opposite. If these requirements are not met, the resulting delay will be much longer (and basically unpredictable), and applications that otherwise do not use floating-point calculations will experience severe code bloat by the floating-point library routines linked into the application. To reduce typing it is OK to add using namespace pmsx at the beginning and not to type pmsx:: anymore as in examples\p04usingPmsx\p04usingPmsx.Note: In order for these functions to work as intended, compiler optimizations must be enabled, and the delay time must be an expression that is a known constant at compile-time. All classes are located in the namespace pmsx.Įxamples use the fully qualified names like pmsx::Pms pms(&pmsSerial) Pms5003 library is designed to avoid namespace pollution. Use the code: examples\p01basic\p01basic.ino PMS5003 pin 7 (black) and pin 7 (red) leave not connected.PMS5003 Pin 6 (yellow): Arduino pin 6 (can be changed or not connected at all).PMS5003 Pin 3 (white): Arduino pin 7 (can be changed or not connected at all).PMS5003 Pin 5 (green): Arduino pin 8 (there is no choice, it is forced by AltSerial).PMS5003 Pin 4 (blue): Arduino pin 9 (there is no choice, it is forced by AltSerial).Use converters if required or make sure your Arduino board uses 3.3V logic too. Important: PMS5003 sensor uses 3.3V logic. pms5003 will not compile using very old Arduino IDE.pms5003 will not compile using original AltSoftSerial lib.Current version uses DrDiettrich' fork of AltSoftSerial Library.Pms5003 library was successfully checked using: #20 write() multiple commands sequentially.#19 write(CMD_WAKEUP) should not delay if already awoken.#17 add iterators begin() and end() for views.#16 write() will return PmsStatus instead of bool.#15 checkSleepPin() - check if declared sleep/wake up pin is properly connected.#14 checkResetPin() - check if declared reset pin works fine (check if it resets the sensor).Pms5003 API description is available as a separate document. Provides support for ISO 14644-1 classification of air cleanliness levels.Serial port is not managed by the library, it is possible to shut serial driver down, enter sleep mode and so on independently on the PMS5003 sensor.Your process receives the status OK or NO_DATA or some kinds of errors but your process never waits for the data. ![]() The main goal: Reading data from the sensor does not block.Written in modern C++11 (please do not afraid - works fine with Arduino IDE).You have a choice to use or not to use: (C style) global variables or (C++ style) class instances.It uses almost any serial communication library,.Library supports all Plantover PMS5003 features (sleep & wake up, passive / active modes, hardware pins),.List of compatible sensors is available as a separate document. There is one interesting fork supporting ESP8266: Other sensorsįor most Plantover sensors probably it is an easy task to add support. Previous release: 1.0 is still available. ![]() Added support for "views" (will be described later) - the most exciting new feature.Added support for ISO 14644-1: Classification of air cleanliness.Added support for more serial port libraries (inversion of control).Added support for sensor hardware pins (pin 3 - SET, pin 6 - RESET).Minor bugs are fixed (nothing important, release 1.0 should be assumed as stable).API contract (class names and methods) is completely rewritten.Release 2.1 brings a lot of changes and improvements: ![]() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |