diff options
author | Pragya28 | 2018-06-06 23:16:39 +0530 |
---|---|---|
committer | Pragya28 | 2018-06-06 23:16:39 +0530 |
commit | 194be212e96b830b62545bb42ab55730cfb5fdf6 (patch) | |
tree | eac930ffba5f19954074943cdfd40571153fe967 | |
parent | f0d5c520e1060fe66d5777e85696017c38b0f3cc (diff) | |
download | OpenModelicaEmbedded-1-194be212e96b830b62545bb42ab55730cfb5fdf6.tar.gz OpenModelicaEmbedded-1-194be212e96b830b62545bb42ab55730cfb5fdf6.tar.bz2 OpenModelicaEmbedded-1-194be212e96b830b62545bb42ab55730cfb5fdf6.zip |
Images in documentation
-rw-r--r-- | OpenModelicaArduino/Resources/Images/DefaultSynchronize.png | bin | 27764 -> 66468 bytes | |||
-rw-r--r-- | OpenModelicaArduino/Resources/Images/Interval.png | bin | 25627 -> 225058 bytes | |||
-rw-r--r-- | OpenModelicaArduino/Resources/Images/ModelPlugLog-nomarkers.png | bin | 32933 -> 172348 bytes | |||
-rw-r--r-- | OpenModelicaArduino/Resources/Images/ModelPlugLog-withmarkers.png | bin | 30569 -> 510685 bytes | |||
-rw-r--r-- | OpenModelicaArduino/Resources/Images/PinNumber.png | bin | 3138 -> 36423 bytes | |||
-rw-r--r-- | OpenModelicaArduino/Resources/Images/QuotedSerialPort.png | bin | 6785 -> 54182 bytes | |||
-rw-r--r-- | OpenModelicaArduino/Resources/Images/StopTime.png | bin | 15893 -> 224766 bytes | |||
-rw-r--r-- | OpenModelicaArduino/Resources/Images/SynchronizeSetting.png | bin | 15362 -> 66468 bytes | |||
-rw-r--r-- | OpenModelicaArduino/package.mo | 75 |
9 files changed, 44 insertions, 31 deletions
diff --git a/OpenModelicaArduino/Resources/Images/DefaultSynchronize.png b/OpenModelicaArduino/Resources/Images/DefaultSynchronize.png Binary files differindex b1192c1..8dfbc8f 100644 --- a/OpenModelicaArduino/Resources/Images/DefaultSynchronize.png +++ b/OpenModelicaArduino/Resources/Images/DefaultSynchronize.png diff --git a/OpenModelicaArduino/Resources/Images/Interval.png b/OpenModelicaArduino/Resources/Images/Interval.png Binary files differindex 849f8f4..514bff0 100644 --- a/OpenModelicaArduino/Resources/Images/Interval.png +++ b/OpenModelicaArduino/Resources/Images/Interval.png diff --git a/OpenModelicaArduino/Resources/Images/ModelPlugLog-nomarkers.png b/OpenModelicaArduino/Resources/Images/ModelPlugLog-nomarkers.png Binary files differindex c719a11..ea0e7df 100644 --- a/OpenModelicaArduino/Resources/Images/ModelPlugLog-nomarkers.png +++ b/OpenModelicaArduino/Resources/Images/ModelPlugLog-nomarkers.png diff --git a/OpenModelicaArduino/Resources/Images/ModelPlugLog-withmarkers.png b/OpenModelicaArduino/Resources/Images/ModelPlugLog-withmarkers.png Binary files differindex 40ab6da..9549bd2 100644 --- a/OpenModelicaArduino/Resources/Images/ModelPlugLog-withmarkers.png +++ b/OpenModelicaArduino/Resources/Images/ModelPlugLog-withmarkers.png diff --git a/OpenModelicaArduino/Resources/Images/PinNumber.png b/OpenModelicaArduino/Resources/Images/PinNumber.png Binary files differindex e45324f..1aff89a 100644 --- a/OpenModelicaArduino/Resources/Images/PinNumber.png +++ b/OpenModelicaArduino/Resources/Images/PinNumber.png diff --git a/OpenModelicaArduino/Resources/Images/QuotedSerialPort.png b/OpenModelicaArduino/Resources/Images/QuotedSerialPort.png Binary files differindex cf0c4c3..8702a59 100644 --- a/OpenModelicaArduino/Resources/Images/QuotedSerialPort.png +++ b/OpenModelicaArduino/Resources/Images/QuotedSerialPort.png diff --git a/OpenModelicaArduino/Resources/Images/StopTime.png b/OpenModelicaArduino/Resources/Images/StopTime.png Binary files differindex 1ad1767..c7d1662 100644 --- a/OpenModelicaArduino/Resources/Images/StopTime.png +++ b/OpenModelicaArduino/Resources/Images/StopTime.png diff --git a/OpenModelicaArduino/Resources/Images/SynchronizeSetting.png b/OpenModelicaArduino/Resources/Images/SynchronizeSetting.png Binary files differindex 41a2924..8dfbc8f 100644 --- a/OpenModelicaArduino/Resources/Images/SynchronizeSetting.png +++ b/OpenModelicaArduino/Resources/Images/SynchronizeSetting.png diff --git a/OpenModelicaArduino/package.mo b/OpenModelicaArduino/package.mo index 5c6ebfd..342c1cf 100644 --- a/OpenModelicaArduino/package.mo +++ b/OpenModelicaArduino/package.mo @@ -5,10 +5,10 @@ package OpenModelicaArduino "Connecting OpenModelica with Arduino" <h4>Preparing Your Board</h4> <p> .</p> <p>The first thing you need to do is upload the Firmware code to your board .</p> - <p><img src=\"Modelica://OpenModelicaArduino/Resources/Images/FirmataLocation.png\" alt=\"\" /></p> + <p><img src=\"modelica://OpenModelicaArduino/Resources/Images/FirmataLocation.png\" alt=\"\" /></p> <p><em>Figure 1. Location of the Firmware sketch.</em></p> <p>Once the the Firmware code is in the board, you need to write down the serial port that it is using. This is important because you need to give the port name to OpenModelicaArduino in order to communicate with the board. You can find the serial port in Tools->Serial Port or in the bottom-right corner of the Arduino software window (see Figure 2). In Windows the serial port name is something like “COM5”, while in OS X and Linux the name will be something like “/dev/ttyACM0”. Now you are ready to make your first model.</p> - <p><img src=\"Modelica://OpenModelicaArduino/Resources/Images/SerialPortLocation.png\" alt=\"\" /></p> + <p><img src=\"modelica://OpenModelicaArduino/Resources/Images/SerialPortLocation.png\" alt=\"\" /></p> <p><em>Figure 2. Finding the serial port being used.</em> </p> <h4>Blinking LED</h4> <p>As a first exercise, you are going to reproduce with OpenModelicaArduino the blinking LED example. You can either open the prebuilt example (OpenModelicaArduino.Examples.BlinkLed) or build it by yourself. To build the model, locate the components:</p> @@ -18,27 +18,27 @@ package OpenModelicaArduino "Connecting OpenModelica with Arduino" <li>Modelica.Blocks.Sources.BooleanPulse</li> </ul> <p>Connect the components as in Figure 3. One thing to notice is that the DigitalOutput model is connected to the Arduino component to specify that the pin belongs to that board. This connection is necessary because OpenModelicaArduino can use multiple boards with multiple pins at the same time.</p> - <p><img src=\"Modelica://OpenModelicaArduino/Resources/Images/BlinkingLEDModel.png\" alt=\"\" /></p> + <p><img src=\"modelica://OpenModelicaArduino/Resources/Images/BlinkingLEDModel.png\" alt=\"\" /></p> <p><em>Figure 3. Diagram of the blinking LED.</em></p> <p>Next you need to specify the serial port that the board is using. This is done by selecting the Arduino component and showing its parameters. In the parameter view, you can find the Port parameter. Write the port name that you got in the section “Preparing your board”. Important: the name must be have quotation marks as shown in Figure 4.</p> - <p><img src=\"Modelica://OpenModelicaArduino/Resources/Images/QuotedSerialPort.png\" alt=\"\" /></p> + <p><img src=\"modelica://OpenModelicaArduino/Resources/Images/QuotedSerialPort.png\" alt=\"\" /></p> <p><em>Figure 4. Specifying the serial port name. </em></p> <p>Now you need to set the pin number that you are going to use in the DigitalOutput component. Usually, the Arduino boards have an LED attached to pin 13. Set that number in the Pin parameter as shown in Figure 5.</p> - <p><img src=\"Modelica://OpenModelicaArduino/Resources/Images/PinNumber.png\" alt=\"\" /></p> + <p><img src=\"modelica://OpenModelicaArduino/Resources/Images/PinNumber.png\" alt=\"\" /></p> <p><em>Figure 5. Specifying the pin to use.</em></p> <p>For the BooleanPulse component, set the 'period' parameter to 1. The model is ready to simulate. Press the simulate button and wait to see the results.</p> <p>The first time you run the model, it is probably simulated so fast that you do not have time to react. The reason is that OpenModelica simulates the model as fast as possible. In order to interact with your models using OpenModelicaArduino, it is necessary to synchronize the simulation time with real time. This is done in by using Synchronisation block in ModelicaDeviceDriver library. After simulating the model one time, you need to check in the checkbox “Synchronize with real-time” as shown in Figure 6.</p> - //<p> <img src=\"Modelica://OpenModelicaArduino/Resources/Images/SynchronizeSetting.png\" alt=\"\" /></p> + //<p> <img src=\"modelica://OpenModelicaArduino/Resources/Images/SynchronizeSetting.png\" alt=\"\" /></p> //<p><em>Figure 6. Synchronizing your simulation with real time.</em> </p> //<p>If you are building many models with the OpenModelicaArduino library, you should set the “Synchronize with real-time” option as a default simulation setting in SimulationCenter under the menu Tools->Options in the section SimulationCenter->Default Experiment (see Figure 7). </p> - //<p><img src=\"Modelica://OpenModelicaArduino/Resources/Images/DefaultSynchronize.png\" alt=\"\" /> </p> + //<p><img src=\"modelica://OpenModelicaArduino/Resources/Images/DefaultSynchronize.png\" alt=\"\" /> </p> //<p><em>Figure 7. Setting \"Synchronize with real-time\" as default.</em></p> //<p>Now run the simulation again and you should see the LED blinking until the simulation reaches the stop time. If you want to keep the simulation running continuously, you need to change the stop time to “infinite” as shown in Figure 8.</p> - //<p><img src=\"Modelica://OpenModelicaArduino/Resources/Images/StopTime.png\" alt=\"\" /></p> + //<p><img src=\"modelica://OpenModelicaArduino/Resources/Images/StopTime.png\" alt=\"\" /></p> //<p><em>Figure 8. Setting the stop time to infinite.</em></p> //<p>If you run the simulation again, you should see the LED blinking continuously.</p> <p>One thing that you may have noticed is that OpenModelicaArduino prints status messages in the simulation log (see Figure 9). The first thing it prints is a list of the available ports. In that list, you should see your current port (A). After that, it prints the current port and the speed used (B). Once the port is opened, you receive a notification that the board is initialized (C). Usually the boards report the version of Firmata that you are running. Then you set the sampling interval that the board uses (D). In this example, you can see that you are setting pin 13 to be an output because you have used the DigitalOutput component (E). Finally you will see that the board will send you a list of all the pins available and thier capabilities (F). This list contains the number of the pin and the modes in which it can be used, for example: DigitalInput, DigitalOutput, AnalogInput, AnalogOutput, and Servo.</p> - <p><img src=\"Modelica://OpenModelicaArduino/Resources/Images/ModelPlugLog-withmarkers.png\" alt=\"\" /></p> + <p><img src=\"modelica://OpenModelicaArduino/Resources/Images/ModelPlugLog-nomarkers.png\" alt=\"\" /></p> <p><em>Figure 9. Messages shown by OpenModelicaArduino.</em></p> <h4>Troubleshooting</h4> <p>This is a checklist that you can follow in order to solve most of the problems that can occur when using the ModelPlug library:</p> @@ -57,6 +57,7 @@ package OpenModelicaArduino "Connecting OpenModelica with Arduino" <p>OpenModelicaArduino contains a series of basic examples showing the functionality of the components. You can check the Examples under ModelPlug.Examples. Once you have learned how to use the basic components of OpenModelicaArduino, you can check the Arduino Playground to learn how to connect other sensors and actuators (<a href=\"http://playground.arduino.cc/\">http://playground.arduino.cc</a>).</p></html>", revisions = ""), Diagram(coordinateSystem(extent = {{-148.5, -105}, {148.5, 105}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5}))); end GettingStarted; + package Pins "Components to access the board I/O" extends Internal.Icons.Block; @@ -292,7 +293,7 @@ equation <h4>Description</h4> <p>This example uses the DigitalOutput component to control the LED attached to the Arduino board on pin 13. It uses a BooleanPulse from the Modelica library to produce an On/Off signal that is fed into the DigitalOutput component. This will make the LED attached to the pin blink.</p> <p>You can go ahead and add more LEDs to the board as shown in the following figure. This will require you to add one more DigitalOutput component to control the LED on pin 9.</p> -<p><img src=\"Modelica://Desktop/Modelica/OpenModelicaArduino/Resources/Images/Blink.png\" alt=\"\" /></p></html>", revisions = ""), Diagram(coordinateSystem(extent = {{-50, -50}, {50, 50}}, initialScale = 0.1, grid = {5, 5}), graphics = {Text(origin = {0, 30}, extent = {{-50, -10}, {50, 10}}, textString = "Blinking an LED", fontSize = 24)})); +<p><img src=\"modelica://OpenModelicaArduino/Resources/Images/Blink.png\" alt=\"\"/></p></html>", revisions = ""), Diagram(coordinateSystem(extent = {{-50, -50}, {50, 50}}, initialScale = 0.1, grid = {5, 5}), graphics = {Text(origin = {0, 30}, extent = {{-50, -10}, {50, 10}}, textString = "Blinking an LED", fontSize = 24)})); end BlinkLed; @@ -308,6 +309,11 @@ end BlinkLed; + + + + + model DimmingLed "Changing the intensity of an LED" extends Modelica.Icons.Example; OpenModelicaArduino.Boards.Arduino arduino(Port = "/dev/ttyACM0", ShowPinCapabilities = true) annotation(Placement(visible = true, transformation(origin = {30, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); @@ -326,11 +332,12 @@ end BlinkLed; </ul> <h4><br />Description</h4> <p>This example uses the AnalogOutput component to change the light intensity of an LED. AnalogOutput uses the Arduino function 'analogWrite', which produces a PWM (Pulse-Width Modulated) signal. This type of signal can be used to directly control the LED intensity. The following figure shows the connections.</p> - <p><img src=\"Modelica://OpenModelicaArduino/Resources/Images/Dimming.png\" alt=\"\" /></p> + <p><img src=\"modelica://OpenModelicaArduino/Resources/Images/Dimming.png\" alt=\"\" /></p> <p>You can check the Arduino Playground to know more about PWM outputs. </p></html>", revisions = ""), Diagram(coordinateSystem(extent = {{-50, -50}, {50, 50}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5}), graphics = {Text(visible = true, origin = {0, 30}, extent = {{-50.857, -10}, {50.857, 10}}, textString = "Dimming LED", fontSize = 24)})); end DimmingLed; + model ReadSensor "Reading analog signals" extends Modelica.Icons.Example; OpenModelicaArduino.Boards.Arduino arduino(Port = "/dev/ttyACM0") annotation(Placement(visible = true, transformation(origin = {0, 15}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); @@ -355,13 +362,14 @@ end BlinkLed; </ul> <h4>Description</h4> <p>This example shows how to read an analog voltage using the AnalogInput component. The analog signal is then compared to a reference, and if the signal is above the reference, it will turn on an LED. You can see in the following figure how to build this example.</p> - <p><img src=\"Modelica://OpenModelicaArduino/Resources/Images/ReadAnalog.png\" alt=\"\" /></p> + <p><img src=\"modelica://OpenModelicaArduino/Resources/Images/ReadAnalog.png\" alt=\"\" /></p> <p>You can see that pin A0 for the Arduino corresponds to pin number 14 for the Firmata. For other boards, the pin numbering may vary.</p> <p>Run the simulation and move the potentiometer. You should see that when the position of the shaft is near the middle, the LED changes state.</p> <p>The AnalogInput component returns a signal between 0 and 1. This value represents the voltage between 0 and the reference voltage. If you prefer to get the signal directly in volts, you need to change the 'MaxValue' property to the reference voltage, but generally it is either 5 V or 3.3 V.</p></html>", revisions = ""), Diagram(coordinateSystem(extent = {{-50, -50}, {50, 50}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5}), graphics = {Text(visible = true, origin = {0, 35}, extent = {{-50, -10}, {50, 10}}, textString = "Reading a Sensor", fontSize = 24)})); end ReadSensor; + model MoveServo "Using servos" extends Modelica.Icons.Example; Boards.Arduino arduino(Port = "COM1") annotation(Placement(visible = true, transformation(origin = {30, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); @@ -381,11 +389,12 @@ end BlinkLed; <h4>Description</h4> <p>This example shows how to control a servo by using the Servo component. You can find the diagram in the following figure.</p> <p>For this example, it is recommended to use an external power source to provide voltage for the servo. This is because the power from the Arduino may not be enough to supply the servo. If you are not sure how to connect your servo, take a look at the reference in the Arduino Playground (<a href=\"http://playground.arduino.cc/\">http://playground.arduino.cc</a>).</p> - <p><img src=\"Modelica://OpenModelicaArduino/Resources/Images/ServoExample.png\" alt=\"\" /></p> + <p><img src=\"modelica://OpenModelicaArduino/Resources/Images/ServoExample.png\" alt=\"\" /></p> <p>Servos are controlled with a signal in the range of 0 to 1, where 0 corresponds to 0 degrees of rotation and 1 to 180 degrees. This example makes the servo bounce from 0 to 180 degrees until it gets stable around 90 degrees.</p></html>", revisions = ""), Diagram(coordinateSystem(extent = {{-50, -50}, {50, 50}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5}), graphics = {Text(visible = true, origin = {-0, 30}, extent = {{-50, -10}, {50, 10}}, textString = "Controlling a Servo", fontSize = 24)})); end MoveServo; + model SimpleONOFF "A simple On/Off controller" extends Modelica.Icons.Example; OpenModelicaArduino.Boards.Arduino arduino(Port = "/dev/ttyACM0") annotation(Placement(visible = true, transformation(origin = {0, 15}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); @@ -416,11 +425,12 @@ end BlinkLed; </ul> <h4>Description</h4> <p>This example is a simple ON/OFF controller and can be used for either heating or cooling. It uses an LM35 to read the temperature, and based on that temperature, the controller switches a relay on or off. You can attach a fan or a heater to the relay, depending on the operation you want to perform. You can find the diagram in the following figure. <br /><strong>Note:</strong> You need to be careful when using relays that control electrical equipment using AC voltage, because an incorrect connection may damage your board.</p> - <p><img src=\"Modelica://OpenModelicaArduino/Resources/Images/SimpleONOFF.png\" alt=\"\" /></p> + <p><img src=\"modelica://OpenModelicaArduino/Resources/Images/SimpleONOFF.png\" alt=\"\" /></p> <p>The target temperature is set by a constant component. The measured temperature is subtracted from the reference in order to obtain the error. The error signal is fed into the hysteresis component, which will send a Boolean signal to control the relay. If you want cooling instead of heating, you need to invert the logic of this signal.</p></html>"), Diagram(coordinateSystem(extent = {{-50, -50}, {50, 50}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5}), graphics = {Text(visible = true, origin = {-0, 35}, extent = {{-50, -10}, {50, 10}}, textString = "Simple ON/OFF Control", fontSize = 24)})); end SimpleONOFF; + model UsingArduinoLeonardo "Basic example of blinking an LED" extends OpenModelicaArduino.Examples.BlinkLed(redeclare ModelPlug.Boards.ArduinoLeonardo arduino); annotation(experiment(StopTime = 10, Interval = 0.001, __Wolfram_SynchronizeWithRealTime = true), Documentation(info = "<html><h4>Hardware Components Used </h4> @@ -431,10 +441,11 @@ end BlinkLed; </ul> <h4>Description</h4> <p>This example shows how the - <a href=\\\"modelica://OpenModelicaArduino.Examples.BlinkLed\\\">BlinkLed</a> can be used with an Arduino Leonardo.</p></html>", revisions = "")); + <a href=\"modelica://OpenModelicaArduino.Examples.BlinkLed\">Blink Led</a> can be used with an Arduino Leonardo.</p></html>", revisions = "")); end UsingArduinoLeonardo; + model UsingCustomBoard "Using a Firmata-compatible board" extends Modelica.Icons.Example; Modelica.Blocks.Sources.BooleanPulse booleanPulse(period = 1) annotation(Placement(visible = true, transformation(origin = {-30, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); @@ -447,7 +458,7 @@ end BlinkLed; <p>- 1 Teensy 3.1 board</p> <h4>Description</h4> <p>This example shows how to use a board with a custom version of Firmata. The Teensy board works perfectly with the StandardFirmata, but in this example it is modified in order get a faster data transfer speed.</p> - <p><img src=\"Modelica://OpenModelicaArduino/Resources/Images/CustomExample.png\" alt=\"\" /></p> + <p><img src=\"modelica://OpenModelicaArduino/Resources/Images/CustomExample.png\" alt=\"\" /></p> <p><br />The main difference of the CustomFirmata component is that it allows you to set the baud rate to the sampling interval that you want to use. In this case the oce of the StandardFirmata is modified to use a baud rate of 115200. You can perform this modification in the source code. Search for the line:</p> <p><span style=\"font-family: 'courier new', courier;\">Firmata.Begin(57600);</span></p> <p>and changing it to</p> @@ -457,10 +468,12 @@ end BlinkLed; <p>and changing it to</p> <p><span style=\"font-family: 'courier new', courier;\">#define MINIMUM_SAMPLING_INTERVAL 1</span></p> <p>This changes the sampling interval limit from 10 ms to 1ms. You have to consider that this change is possible because the Teensy board can run up to 96 MHz. If you change the sampling interval, it is necessary to change the simulation setting in SimulationCenter to 1 ms, as shown in the following figure.</p> - <p><img src=\"Modelica://OpenModelicaArduino/Resources/Images/Interval.png\" alt=\"\" /></p></html>", revisions = ""), Diagram(coordinateSystem(extent = {{-50, -50}, {50, 50}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5}), graphics = {Text(visible = true, origin = {0, 30}, extent = {{-50, -10}, {50, 10}}, textString = "Using a Custom Board", fontSize = 24)})); + <p><img src=\"modelica://OpenModelicaArduino/Resources/Images/Interval.png\" alt=\"\" /></p></html>", revisions = ""), Diagram(coordinateSystem(extent = {{-50, -50}, {50, 50}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5}), graphics = {Text(visible = true, origin = {0, 30}, extent = {{-50, -10}, {50, 10}}, textString = "Using a Custom Board", fontSize = 24)})); end UsingCustomBoard; + + model UsingStandardFirmata "Using a standard Firmata board" extends Modelica.Icons.Example; Boards.StandardFirmata standardFirmata(Port = "COM1", ShowPinCapabilities = true) annotation(Placement(visible = true, transformation(origin = {30, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); @@ -478,7 +491,7 @@ end BlinkLed; <h4>Description</h4> <p>This example uses the DigitalOutput component to control the LED attached to a standard Firmata board on pin 13. It uses a BooleanPulse from the Modelica library to produce an On/Off signal that is fed into the DigitalOutput component. This will make the LED attached to the pin blink.</p> <p>You can go ahead and add more LEDs to the board as shown in the following figure. This will require you to add one more DigitalOutput component to control the LED on pin 9.</p> - <p><img src=\"Modelica://OpenModelicaArduino/Resources/Images/StandardFirmata.png\" alt=\"\" /></p></html>", revisions = ""), Diagram(coordinateSystem(extent = {{-50, -50}, {50, 50}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5}), graphics = {Text(visible = true, origin = {-0, 30}, extent = {{-50, -10}, {50, 10}}, textString = "Using Standard Firmata", fontSize = 24)})); + <p><img src=\"modelica://OpenModelicaArduino/Resources/Images/StandardFirmata.png\" alt=\"\" /></p></html>", revisions = ""), Diagram(coordinateSystem(extent = {{-50, -50}, {50, 50}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5}), graphics = {Text(visible = true, origin = {-0, 30}, extent = {{-50, -10}, {50, 10}}, textString = "Using Standard Firmata", fontSize = 24)})); end UsingStandardFirmata; annotation(Diagram(coordinateSystem(extent = {{-148.5, -105}, {148.5, 105}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5}))); @@ -597,7 +610,7 @@ end BlinkLed; end Internal; annotation(preferredView = "info", Diagram(coordinateSystem(extent = {{-148.5, -105}, {148.5, 105}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5})), Documentation(info = "<html> <h4>What Is ModelPlug?</h4> <p>ModelPlug is a library that allows you to connect your simulations with the real world. It uses an Arduino board (or compatible) to send analog and digital signals to physical devices and receive signals from them.</p> -<p><img src=\"Modelica://OpenModelicaArduino/Resources/Images/ModelPlugDocumentation-1.png\" alt=\"\" /></p> +<p><img src=\"modelica://OpenModelicaArduino/Resources/Images/ModelPlugDocumentation-1.png\" alt=\"\" /></p> <h4>What Can You Do with It?</h4> <ul> <li>Interact with your model by using buttons, switches, knobs, etc.</li> @@ -608,9 +621,9 @@ end BlinkLed; <p> </p> <p>With ModelPlug, you can combine simulation models and real hardware. For example, you can get data from your hardware, design a control, and test it in real time.</p> <p> </p> -<p><img src=\"Modelica://OpenModelicaArduino/Resources/Images/ModelPlugDocumentation-2.png\" alt=\"\" /></p> +<p><img src=\"modelica://OpenModelicaArduino/Resources/Images/ModelPlugDocumentation-2.png\" alt=\"\" /></p> <p> You can build a real control panel and use it to control your simulation models. </p> -<p><img src=\"Modelica://OpenModelicaArduino/Resources/Images/ModelPlugDocumentation-3.png\" alt=\"\" /></p> +<p><img src=\"modelica://OpenModelicaArduino/Resources/Images/ModelPlugDocumentation-3.png\" alt=\"\" /></p> <h4>Overview of the Components</h4> <p>ModelPlug provides the following components:</p> <table style=\"height: 212px;\" width=\"479\"> @@ -623,12 +636,12 @@ end BlinkLed; <tr> <td>Analog input</td> <td>Reads analog values from the pins</td> -<td style=\"text-align: center;\"><img src=\"Modelica://OpenModelicaArduino/Resources/Images/analogInput.png\" alt=\"\" /> </td> +<td style=\"text-align: center;\"><img src=\"modelica://OpenModelicaArduino/Resources/Images/analogInput.png\" alt=\"\" /> </td> </tr> <tr> <td>Digital input</td> <td>Reads digital values from the pins</td> -<td style=\"text-align: center;\"> <img src=\"Modelica://OpenModelicaArduino/Resources/Images/digitalInput.png\" alt=\"\" /></td> +<td style=\"text-align: center;\"> <img src=\"modelica://OpenModelicaArduino/Resources/Images/digitalInput.png\" alt=\"\" /></td> </tr> <tr> <td><strong> </strong></td> @@ -638,17 +651,17 @@ end BlinkLed; <tr> <td>Analog output</td> <td>Writes analog values to the pins</td> -<td style=\"text-align: center;\"> <img src=\"Modelica://OpenModelicaArduino/Resources/Images/analogOutput.png\" alt=\"\" /></td> +<td style=\"text-align: center;\"> <img src=\"modelica://OpenModelicaArduino/Resources/Images/analogOutput.png\" alt=\"\" /></td> </tr> <tr> <td>Digital output</td> <td>Writes digital values to the pins</td> -<td style=\"text-align: center;\"> <img src=\"Modelica://OpenModelicaArduino/Resources/Images/digitalOutput.png\" alt=\"\" /></td> +<td style=\"text-align: center;\"> <img src=\"modelica://OpenModelicaArduino/Resources/Images/digitalOutput.png\" alt=\"\" /></td> </tr> <tr> <td>Servo control</td> <td>Writes the angle to servo motors</td> -<td> <img style=\"display: block; margin-left: auto; margin-right: auto;\" src=\"Modelica://OpenModelicaArduino/Resources/Images/servo.png\" alt=\"\" /></td> +<td> <img style=\"display: block; margin-left: auto; margin-right: auto;\" src=\"modelica://OpenModelicaArduino/Resources/Images/servo.png\" alt=\"\" /></td> </tr> <tr> <td><strong> </strong></td> @@ -658,22 +671,22 @@ end BlinkLed; <tr> <td>Arduino</td> <td>Connects to Arduino boards like Arduino Uno, Arduino Mega 2560</td> -<td> <img style=\"display: block; margin-left: auto; margin-right: auto;\" src=\"Modelica://OpenModelicaArduino/Resources/Images/arduino.png\" alt=\"\" /></td> +<td> <img style=\"display: block; margin-left: auto; margin-right: auto;\" src=\"modelica://OpenModelicaArduino/Resources/Images/arduino.png\" alt=\"\" /></td> </tr> <tr> <td>Arduino Leonardo</td> <td>Connects to Arduino Leonardo boards and boards using native USB</td> -<td> <img style=\"display: block; margin-left: auto; margin-right: auto;\" src=\"Modelica://OpenModelicaArduino/Resources/Images/arduinoLeonardo.png\" alt=\"\" /></td> +<td> <img style=\"display: block; margin-left: auto; margin-right: auto;\" src=\"modelica://OpenModelicaArduino/Resources/Images/arduinoLeonardo.png\" alt=\"\" /></td> </tr> <tr> <td>StandardFirmata</td> <td>Connects to Arduino-compatible boards</td> -<td> <img style=\"display: block; margin-left: auto; margin-right: auto;\" src=\"Modelica://OpenModelicaArduino/Resources/Images/standard.png\" alt=\"\" /></td> +<td> <img style=\"display: block; margin-left: auto; margin-right: auto;\" src=\"modelica://OpenModelicaArduino/Resources/Images/standard.png\" alt=\"\" /></td> </tr> <tr> <td>CustomFirmata</td> <td>Connects to any board supporting Firmata</td> -<td> <img style=\"display: block; margin-left: auto; margin-right: auto;\" src=\"Modelica://OpenModelicaArduino/Resources/Images/custom.png\" alt=\"\" /></td> +<td> <img style=\"display: block; margin-left: auto; margin-right: auto;\" src=\"modelica://OpenModelicaArduino/Resources/Images/custom.png\" alt=\"\" /></td> </tr> </tbody> </table> @@ -705,5 +718,5 @@ end BlinkLed; <p> </p> <p> </p> <p> </p></html>", revisions = ""), version = "1.2", Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5}), graphics = {Rectangle(visible = true, fillColor = {190, 53, 19}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{-100, -100}, {100, 100}}, radius = 25), Polygon(visible = true, origin = {-17.857, -4.643}, fillColor = {128, 128, 128}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, points = {{42.857, 59.643}, {42.857, 64.643}, {37.857, 69.643}, {32.857, 69.643}, {-17.143, 69.643}, {-42.143, 54.643}, {-57.143, 34.643}, {-65.22199999999999, 4.643}, {-57.143, -25.357}, {-42.143, -45.357}, {-17.143, -60.357}, {32.857, -60.357}, {37.857, -60.357}, {42.857, -55.357}, {42.857, -50.357}}, smooth = Smooth.Bezier), Polygon(visible = true, origin = {-17.857, -4.643}, fillColor = {255, 255, 255}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, points = {{42.857, 59.643}, {42.857, 64.643}, {37.857, 69.643}, {30.028, 54.643}, {-12.143, 59.643}, {-37.143, 44.643}, {-50.141, 26.339}, {-55.168, 4.643}, {-52.143, -20.357}, {-42.143, -42.453}, {-17.143, -60.357}, {32.857, -60.357}, {37.857, -60.357}, {42.857, -55.357}, {42.857, -50.357}}, smooth = Smooth.Bezier), Rectangle(visible = true, origin = {50, 27.5}, lineColor = {128, 128, 128}, fillColor = {255, 255, 255}, fillPattern = FillPattern.HorizontalCylinder, extent = {{-25, -12.5}, {25, 12.5}}), Rectangle(visible = true, origin = {50, -27.5}, lineColor = {128, 128, 128}, fillColor = {255, 255, 255}, fillPattern = FillPattern.HorizontalCylinder, extent = {{-25, -12.5}, {25, 12.5}}), Polygon(visible = true, origin = {-23.077, -0.385}, fillColor = {191, 191, 191}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, points = {{38.077, 50.385}, {38.077, 55.385}, {33.077, 55.385}, {-6.923, 55.385}, {-26.923, 45.385}, {-41.923, 30.385}, {-50.213, 0.385}, {-41.923, -29.615}, {-26.923, -44.615}, {-6.923, -54.615}, {33.077, -54.615}, {38.077, -54.615}, {38.077, -49.615}}, smooth = Smooth.Bezier), Polygon(visible = true, origin = {-17.857, -4.643}, lineColor = {128, 128, 128}, fillColor = {128, 128, 128}, points = {{42.857, 59.643}, {42.857, 64.643}, {37.857, 69.643}, {32.857, 69.643}, {-17.143, 69.643}, {-42.143, 54.643}, {-57.143, 34.643}, {-65.22199999999999, 4.643}, {-57.143, -25.357}, {-42.143, -45.357}, {-17.143, -60.357}, {32.857, -60.357}, {37.857, -60.357}, {42.857, -55.357}, {42.857, -50.357}}, smooth = Smooth.Bezier)}), Diagram(coordinateSystem(extent = {{-148.5, -105}, {148.5, 105}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5})), - uses(Modelica_DeviceDrivers(version = "1.5.0"))); + uses(Modelica_DeviceDrivers(version = "1.5.0"), Modelica(version = "3.2.2"))); end OpenModelicaArduino; |