début de travail sur les ports
This commit is contained in:
parent
be7a516312
commit
3fa7a52699
53
chrono.md
53
chrono.md
@ -74,6 +74,7 @@ B1 B2 B3 B4 B5 B6 B7 B8
|
||||
B1 : à 1 pour signaler que c'est l'octet de statu
|
||||
|
||||
B2 B3 B4 : pour indiquer l'action :
|
||||
|
||||
* 000 : Note Off
|
||||
* 001 : Note On
|
||||
* 010 : Polyphonic Aftertouch
|
||||
@ -105,6 +106,7 @@ Dans notre projet, quand on appuit le capteur capte = on joue la note.
|
||||
quand on relache , on arrête la note.
|
||||
|
||||
Hex to MIDI note chart
|
||||
|
||||
* 00 : C -1
|
||||
* 01 : C# -1
|
||||
* 02 : D -1
|
||||
@ -225,29 +227,56 @@ Hex to MIDI note chart
|
||||
* 75 : A 8
|
||||
* 76 : Bb 8
|
||||
* 77 : B 8
|
||||
|
||||
|
||||
|
||||
essai ok avec un capteur sur note C2
|
||||
|
||||
message type noteOn(0x90 ; 0x24 ; 0x70) ; /* statut note sur canal1 ; C2 ; vel 112 */
|
||||
|
||||
puis modif ajout de 2 capteurs : ok mais relance du synthe pour avoir le midi.
|
||||
|
||||
essai ok avec un capteur sur note C2
|
||||
|
||||
message type noteOn(0x90 ; 0x24 ; 0x70) ; /* statut note sur canal1 ; C2 ; vel 112 */
|
||||
puis modif ajout de 2 capteurs : ok mais relance du synthe pour avoir le midi.
|
||||
|
||||
|
||||
16/08/2019
|
||||
|
||||
|
||||
depuis la derniere cession, réception des capteurs et résistances
|
||||
achat de contre-plaqué pour faire des gabarits.
|
||||
|
||||
|
||||
corrections sur fichier "chrono"
|
||||
re-tester le dernier logiciel (3 capteurs) avec synthe (motif ES) : OK
|
||||
|
||||
|
||||
réalisation d'un montage avec 12 capteurs, alim supplémentaire
|
||||
branchement sur les ports 24 à 35 de l'arduino.
|
||||
|
||||
|
||||
Ca semblait fonctionner mais message d'erreur sur le synthe.
|
||||
lors des essais, je me suis retrouvé avec un son de téléphone sur une note !!!???
|
||||
|
||||
|
||||
|
||||
|
||||
13/09/19
|
||||
http://www.mon-club-elec.fr/pmwiki_reference_arduino/pmwiki.php?n=Main.PortManipulation
|
||||
|
||||
Quelques recherches sur les ports ARDUINO pour essayer un nouveau mode :
|
||||
|
||||
appeler les ports = gérer 8 entrées en en une fois.
|
||||
|
||||
|
||||
|
||||
3 fonctions pour gérer les ports :
|
||||
|
||||
- DDR(nom_du_port) : configure les pin en entrées ou sorties : 1 = ENTREE , 0 = SORTIE
|
||||
|
||||
exemple : DDRA = B10101010
|
||||
|
||||
met A7, A5, A3, A1 en entrées et A6, A4, A2, A0 en sorties
|
||||
|
||||
- PORT :
|
||||
|
||||
- PIN :
|
||||
|
||||
|
||||
|
||||
Attention le port de communication (usb) est lié aux pin1 = tx0 + pin0 = rx0 qui sont les bits de poids faibles du port E : dangereux car risque de déprogrammer et donc plus de liaison avec l'ordi.
|
||||
|
||||
- [& (ET bit à bit)](http://www.mon-club-elec.fr/pmwiki_reference_arduino/pmwiki.php?n=Main.Bitabit)
|
||||
- [|(OU bit à bit)](http://www.mon-club-elec.fr/pmwiki_reference_arduino/pmwiki.php?n=Main.Bitabit)
|
||||
- [^(OU EXCLUSIF bit à bit)](http://www.mon-club-elec.fr/pmwiki_reference_arduino/pmwiki.php?n=Main.Bitabit)
|
||||
- [˜(NON bit à bit)](http://www.mon-club-elec.fr/pmwiki_reference_arduino/pmwiki.php?n=Main.NONbitabit)
|
||||
|
@ -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 |
Loading…
x
Reference in New Issue
Block a user