Hi,
ich bin's wieder. Vielleicht kennt mich ja jemand von Euch noch von letztem Mal.
Und zwar habe ich einen neuen und einen alten Laptop und ich hätte gerne diesen Song hier auf meinem alten Laptop. Allerdings kennt mein neuer Laptop keine Disketten und hat auch keine serielle oder parallele Schnittstelle und mein alter Laptop kennt kein LAN, WLAN, Bluetooth und auch keine Speicherkarten, hat aber ein DOS-Programm namens LapLink DE-3.00, mit dem man Dateien und Ordner über eine serielle oder parallele Schnittstelle übertragen kann, und da ein Arduino für den PC eine ganz normale serielle Schnittstelle ist, wollte ich die Datei eben darüber übertragen, aber irgendwie funktioniert das nicht. Ich hab's mit und ohne Serial.begin probiert, aber in beiden Fällen lehnt DOSBox 0.74 das Gerät ab und springt wieder auf "dummy" zurück (Wieso? Es ist doch auch ein COM-Port.) und die Signale, die der Arduino vom alten Laptop erhält, sendet er an ihn sofort wieder zurück, was ich auch nicht verstehe.
Bei den Beispielen gibt es bei "COMMUNICATION" ja ein Sketch namens "SerialPassthrough", bei dem angezeigt wird, dass "Serial" die Pins 0 und 1 und "Serial1" die USB-Schnittstelle sind,
/*
SerialPassthrough sketch
Some boards, like the Arduino 101, the MKR1000, Zero, or the Micro, have one
hardware serial port attached to Digital pins 0-1, and a separate USB serial
port attached to the IDE Serial Monitor. This means that the "serial
passthrough" which is possible with the Arduino UNO (commonly used to interact
with devices/shields that require configuration via serial AT commands) will
not work by default.
This sketch allows you to emulate the serial passthrough behaviour. Any text
you type in the IDE Serial monitor will be written out to the serial port on
Digital pins 0 and 1, and vice-versa.
On the 101, MKR1000, Zero, and Micro, "Serial" refers to the USB Serial port
attached to the Serial Monitor, and "Serial1" refers to the hardware serial
port attached to pins 0 and 1. This sketch will emulate Serial passthrough
using those two Serial ports on the boards mentioned above, but you can change
these names to connect any two serial ports on a board that has multiple ports.
created 23 May 2016
by Erik Nyquist
*/
void setup() {
Serial.begin(9600);
Serial1.begin(9600);
}
void loop() {
if (Serial.available()) { // If anything comes in Serial (USB),
Serial1.write(Serial.read()); // read it and send it out Serial1 (pins 0 & 1)
}
if (Serial1.available()) { // If anything comes in Serial1 (pins 0 & 1)
Serial.write(Serial1.read()); // read it and send it out Serial (USB)
}
}
aber auf meine Arduino Unos lässt es sich leider nicht raufladen und mit meinem Arduino Mega 2560 funktioniert es nicht so, wie es eigentlich funktionieren soll. Auch wenn ich es auf ihn raufgeladen habe, zeigt der Monitor immer noch nicht an, was vom alten Laptop empfangen wird, was ich beim Monitor eingebe, wird auch nicht an den alten Laptop gesendet, und egal, welcher Eingangspin etwas vom alten Laptop empfängt, es kommt gleich bei allen Ausgangspins auf einmal wieder raus.
Was muss ich also tun, damit ich einen meiner Arduinos als ganz normale serielle Schnittstelle für DOSBox 0.74 benutzen kann? Und muss dafür auch Arduino Create Agent geschlossen werden, falls es stören sollte?
Vielen Dank schon mal im Voraus!