début de travail sur les ports
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
/* capteur branché avec sortie sur pin24 arduino */
|
||||
/* sortie capteur branché sur pin24 arduino */
|
||||
|
||||
bool EtatEntree24 = HIGH ;
|
||||
bool VarSuivi24 = HIGH ;
|
||||
@ -25,6 +25,7 @@
|
||||
|
||||
bool EtatEntree31 = HIGH ;
|
||||
bool VarSuivi31 = HIGH ;
|
||||
|
||||
|
||||
bool EtatEntree32 = HIGH ;
|
||||
bool VarSuivi32 = HIGH ;
|
||||
@ -101,41 +102,46 @@ void loop()
|
||||
EtatEntree24 = digitalRead(24);
|
||||
EtatEntree25 = digitalRead(25);
|
||||
EtatEntree26 = digitalRead(26);
|
||||
EtatEntree27 = digitalRead(27);
|
||||
EtatEntree27 = digitalRead(27);
|
||||
EtatEntree28 = digitalRead(28);
|
||||
EtatEntree29 = digitalRead(29);
|
||||
EtatEntree29 = digitalRead(29);
|
||||
EtatEntree30 = digitalRead(30);
|
||||
EtatEntree31 = digitalRead(31);
|
||||
EtatEntree32 = digitalRead(32);
|
||||
EtatEntree31 = digitalRead(31);
|
||||
EtatEntree32 = digitalRead(32);
|
||||
EtatEntree33 = digitalRead(33);
|
||||
EtatEntree34 = digitalRead(34);
|
||||
EtatEntree35 = digitalRead(35);
|
||||
EtatEntree34 = digitalRead(34);
|
||||
EtatEntree35 = digitalRead(35);
|
||||
|
||||
|
||||
|
||||
if ( (EtatEntree24 != VarSuivi24) && (EtatEntree24 == HIGH) )
|
||||
{
|
||||
noteOn(0x80, 0x24 , 0x00) ; /* note off sur canal1 ; C2 ; vel 0 */
|
||||
VarSuivi24 = HIGH; /* "touche relachée" */
|
||||
}
|
||||
noteOn(0x80, 0x24 , 0x00) ; /* note off sur canal1 ; C2 ; vel 0 */
|
||||
/* Serial.println("touche lachee"); */
|
||||
VarSuivi24 = HIGH;
|
||||
}
|
||||
|
||||
if ( (EtatEntree24 != VarSuivi24) && (EtatEntree24 == LOW) )
|
||||
{
|
||||
noteOn(0x90, 0x24 , 0x70) ; /* note on sur canal1 ; C2 ; vel */
|
||||
VarSuivi24 = LOW; /* "touche appuyee" */
|
||||
noteOn(0x90, 0x24 , 0x70) ; /* note on sur canal1 ; C2 ; vel */
|
||||
/* Serial.println("touche appuyee"); */
|
||||
VarSuivi24 = LOW;
|
||||
}
|
||||
|
||||
|
||||
if ( (EtatEntree25 != VarSuivi25) && (EtatEntree25 == HIGH) )
|
||||
{
|
||||
noteOn(0x80, 0x25 , 0x00) ;
|
||||
/* Serial.println("touche lachee"); */
|
||||
VarSuivi25 = HIGH;
|
||||
}
|
||||
if ( (EtatEntree25 != VarSuivi25) && (EtatEntree25 == LOW) )
|
||||
{
|
||||
noteOn(0x90, 0x25 , 0x70) ; /* note on sur canal1 ; C#2 ; vel */
|
||||
VarSuivi25 = LOW;
|
||||
}
|
||||
|
||||
if ( (EtatEntree25 != VarSuivi25) && (EtatEntree25 == LOW) )
|
||||
{
|
||||
noteOn(0x90, 0x25 , 0x70) ; /* note on sur canal1 ; C2 ; vel */
|
||||
/* Serial.println("touche appuyee"); */
|
||||
VarSuivi25 = LOW;
|
||||
}
|
||||
if ( (EtatEntree26 != VarSuivi26) && (EtatEntree26 == HIGH) )
|
||||
{
|
||||
noteOn(0x80, 0x26 , 0x00) ; /* note off sur canal1 ; D2 ; vel 0 */
|
||||
@ -303,3 +309,6 @@ void loop()
|
||||
delay(100); */
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
BIN
ressource arduino/ardunio_mega_pinout.jpg
Normal file
BIN
ressource arduino/ardunio_mega_pinout.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 133 KiB |
Reference in New Issue
Block a user