|
|
build Simulink model (arduino-uno as an input) |
|
fejji |
Forum-Newbie
|
|
Beiträge: 1
|
|
|
|
Anmeldedatum: 30.05.16
|
|
|
|
Wohnort: ---
|
|
|
|
Version: ---
|
|
|
|
|
|
Verfasst am: 30.05.2016, 11:30
Titel: build Simulink model (arduino-uno as an input)
|
|
|
|
|
Hi all,
I'm using arduino uno with my Waycon sensor.
I'm trying to build a model in simulink where I can show the output result of my arduino-code.
First i succeeded to build this model in order to simulate this code which consist to represent the inpuls number/s of the waycon.
#include <Encoder.h>
Encoder myEnc(2, 3);
// avoid using pins with LEDs attached
void setup() {
Serial.begin(115200);
}
void loop() {
long newPosition = myEnc.read();
Serial.println(newPosition);
delay(10);
related simulink model: see attachment
Now I'm trying to build another Simulink model for this arduino code which consist to represent the inpuls number/s and the compilation time in the same time.
arduino-uno code:
#include <Encoder.h>
Encoder myEnc(2, 3);
// avoid using pins with LEDs attached
void setup() {
Serial.begin(115200);
}
void loop() {
long newPosition = myEnc.read();
Serial.println(newPosition);
delay(10);
unsigned long time;
Serial.print("Time: ");
time = millis();
Serial.println(time);
delay(1000);
}
I tried the same model so i get this error: esponse from instrument was non-numeric.
Could someone help me on this enquiry, how can i manage to show two results from arduino code in one simulink model . I'm quiet new and i already begin working on arduino and simulink
Many thanks in advance
Beschreibung: |
|
Download |
Dateiname: |
Unbenannt.PNG |
Dateigröße: |
3.54 KB |
Heruntergeladen: |
375 mal |
|
|
|
|
|
|
|
Einstellungen und Berechtigungen
|
|
Du kannst Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen. Du kannst Dateien in diesem Forum posten Du kannst Dateien in diesem Forum herunterladen
|
|
Impressum
| Nutzungsbedingungen
| Datenschutz
| FAQ
| RSS
Hosted by:
Copyright © 2007 - 2024
goMatlab.de | Dies ist keine offizielle Website der Firma The Mathworks
MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.
|
|