Group Abstract Group Abstract

Message Boards Message Boards

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?

POSTED BY: Tsai Ming-Chou
2 Replies

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

POSTED BY: Otto Tronarp
Anonymous User
Anonymous User
Posted 6 years ago
POSTED BY: Anonymous User
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard