Gerne möchte ich mit Andruino meine AVR Platine Steuern.
Dazu habe paar Pin welche muss ich verwenden, aber sind nicht bei ATMEGA2560 - Arduino Aufgelistet.
Meine Frage betreff z.B. PortD.4;PortD.5 und PortD.6.
Gibt eine direkte Befehl z.B. int MyPin = PD.5 ?
Ich benutze eine Platine mit AT2560 welche will ich zu RepRap Drucker "Zwingen" versuche. Hat jedoch nicht alle Pins nach außen aufgeführt, dazu hat aber paar andere (Nicht bekante für Arduino) auf Steckleiste.
Hallo,
Keine Fehler Meldung aber Pin statisch hat eine "Low", klappert nicht wie LED Pin
meine Testcode:
int ledPin = 13; // LED connected to digital pin 13
uint8_t testpin = PIND & _BV(PD5);
// The setup() method runs once, when the sketch starts
void setup() {
// initialize the digital pin as an output:
pinMode(ledPin, OUTPUT);
pinMode(testpin, OUTPUT);
}
// the loop() method runs over and over again,
// as long as the Arduino has power
void loop()
{
digitalWrite(ledPin, HIGH); // set the LED on
digitalWrite(testpin, HIGH); // set the PD5 on
delay(500); // wait for a 0.5 second
digitalWrite(ledPin, LOW); // set the LED off
digitalWrite(testpin, LOW); // set the PD5 on
delay(100); // wait for a 0.1 second
digitalWrite(ledPin, HIGH); // set the LED on
digitalWrite(testpin, HIGH); // set the PD5 on
delay(100); // wait for a 0.1 second
digitalWrite(ledPin, LOW); // set the LED off
digitalWrite(testpin, LOW); // set the PD5 on
delay(100); // wait for a 0.1 second