How does Arduino use Systemmodeler to read digital sensors?

I can use Systemmodeler to read data from analog sensors (such as DHT22) on Arduino, but there is no way for digital sensors (such as Plantower PMS3003). Can someone suggest?

wolfram has a web page dedicated to listing what sensors work with mathematica - including ones planned or being worked on

you can check to see if that sensor is currently under development there

obviously if it doesn’t yet exists you’d find a work around or make a driver

mostly: i suggest searching forums and reading all ardiuno articles: you might find something

arduino is an animal. it can have many inputs and outputs. the above reads serial data from the arduino. now how you set up arduino so your sensor’s data so it is accessible as arduino serial data i don’t know. it could be you have to check the manufacturer of the sensor and ask them why ardiuno doesn’t see it’s data as something that can be read on serial ports. i don’t know.

PMS3003 has a serial interface so I think the easiest way to integrate that into System Modeler is to use a USB/serial cable and write an ExternalObject (using C) to communicate with it. You can find an example of writing ExternalObjects here: wsm:///ref/ModelicaByExample/behavior/functions/interpolation/#using-an-externalobject

Otto