Message Boards Message Boards

GROUPS:

How does Arduino use Systemmodeler to read digital sensors?

Posted 4 months ago
676 Views
|
2 Replies
|
1 Total Likes
|

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?

2 Replies

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

https://community.wolfram.com/groups/-/m/t/1286876

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

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract