ich habe da mal eine Frage zum Arduino Micro. Ich benutze Ihn als Controller Steuerung mit Keybord Funktion. Nun benötige ich noch die Serielle Schnittstelle. Beim ATmega32u4 gibt es ja die USB Schnittstelle, die separat ausgeführt ist. Sind beide intern verbunden? Sodas die Serielle RX/TX an den Pins 1 und 2 nicht mehr verwendet werden können?
Woher soll ich das wissen? Ich hab meine Kristallkugel zur Zeit in Generalüberholung. Zuviel Hellsehen bringt einen weißen Niederschlag im Inneren mit sich.
Ich weiß ja gar nicht was Du versuchst zu machen.
laut Serial - Arduino Reference Serial.begin (ohne 1 und mit kleinem B)
The Micro has a number of facilities for communicating with a computer, another board of the Arduino & Genuino family, or other microcontrollers. The 32U4 provides UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX). The ATmega32U4 also allows for serial (CDC) communication over USB and appears as a virtual com port to software on the computer. The chip also acts as a full speed USB 2.0 device, using standard USB COM drivers. On Windows, a .inf file is required . The Arduino Software (IDE) includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB connection to the computer (but not for serial communication on pins 0 and 1).
aber wenn ich das richtig interpretiere. Dann funktionieren die LED nur bei der Seriellen Kommunikation über USB.
Deine Glaskugel ist nicht wirklich nötig :-). Ich möchte über die Serielle Schnittstelle Pin 0 und 1 daten zum Micro schicken und diese dann über USB an den Computer.
Ich habe jetzt einen MICRO nur mit Serial Programmiert. Aber beim MICRO scheint die Serielle Schnittstelle RX/TX Pin 0 und 1 nicht zu funktionieren, Ich habe 4 neue ausprobiert. SoftSerial dagegen funktioniert.
#define LED_Pin 13
#define SPEED_SERIAL 9600
unsigned long Mill = millis() ;
unsigned long BlinkTimer = 0 ;
long BlinkInterval = 1000 ;
byte BlinkStatus = 0 ;
int i = 0 ;
char thisSerialChar = 0 ;
void setup() {
// put your setup code here, to run once:
pinMode(LED_Pin, OUTPUT) ;
Serial.begin(SPEED_SERIAL);
}
void loop() {
// put your main code here, to run repeatedly:
Mill = millis();
// Damit man sieht ob das Programm läuft
if (BlinkTimer<Mill) {
BlinkTimer = Mill + BlinkInterval ;
if (BlinkStatus == 0) {
BlinkStatus = 1 ;
digitalWrite(LED_Pin,HIGH);
}
else {
BlinkStatus = 0 ;
digitalWrite(LED_Pin,LOW);
}
Serial.write("u");
}
}
im Sekundentakt sollte ein “u” versendet werden. Wenn der Serial Monitor von der IDE gestartet wird kann man das “u” sehen. Auch die LED für RX und TX leuchten dann. Aber die Pins 0 und 1 sind tot. Kann es sein das man etwas mit den FUSE bits machen muss, oder sonstwo etwas ändern?