Code:
byte incomingByte;
byte note;
byte velocity;
int action=2;
int notes[]= {36, 40, 41, 43, 44, 46, 42, 39, 37, 52};
int pins[]= { 6, 5, 2, 8, 7, 10, 11, 4, 3, 9};
unsigned long pintime[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
const unsigned long pininterv[]= {10, 20, 10, 10, 10, 10, 30, 10, 10, 70};
int pinstate[]= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
int delayseq[]= {20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180};
void setup() {
pinMode(2,OUTPUT);
pinMode(3,OUTPUT);
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
pinMode(6,OUTPUT);
pinMode(7,OUTPUT);
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
pinMode(11,OUTPUT);
pinMode(13,OUTPUT);
for (int i=0; i<=9; i++) {
pintime[i]=millis ();
digitalWrite(pins[i], LOW);
}
Serial.begin(31250);
}
void loop () {....}
Kann ich hier mit der jSerialComm Jar Bibliothek arbeiten ?
Lesezeichen