Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Dernière révision Les deux révisions suivantes | ||
logiciels:serial:accueil [2014/07/30 09:57] resonance |
logiciels:serial:accueil [2018/01/18 06:50] chenjianwei [2D et 3D PRIMITIVES] |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== Communication série | + | http:// |
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
- | Pour communiquer entre une carte Arduino et le logiciel Pure Data, il existe plusieurs solutions, listées [[http:// | ||
- | Cependant il peut arriver que nous ayons besoin de plus de fonctionnalités comme l' | ||
- | **Téléchargement** de tous les codes de cette page : {{.:arduino-pd-serial.zip|}} | + | |
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== 2D et 3D PRIMITIVES ===== | ||
+ | Cercle, carré, rectangle, sphère, cylindre, tore, cone, ... | ||
+ | |||
+ | {{.:primitives.png}} | ||
===== Prérequis ===== | ===== Prérequis ===== | ||
Ligne 11: | Ligne 212: | ||
Une autre notion technique très utilisée ici est celle de **String**, littéralement " | Une autre notion technique très utilisée ici est celle de **String**, littéralement " | ||
+ | |||
+ | |||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | Avec les Arduino Leonardo, il y a une petite différence, | ||
+ | </ | ||
===== Une valeur ===== | ===== Une valeur ===== | ||
- | L' | + | L' |
Quand il s'agit d'un nombre pas de problème, mais on peut aussi vouloir envoyer des caractères. Pour ce faire le caractère est converti en nombre entre 0 et 255 soit 8 bits. La conversion suit le standard [[http:// | Quand il s'agit d'un nombre pas de problème, mais on peut aussi vouloir envoyer des caractères. Pour ce faire le caractère est converti en nombre entre 0 et 255 soit 8 bits. La conversion suit le standard [[http:// | ||
Ligne 80: | Ligne 287: | ||
La fonction **Serial.available()** est toujours utilisée pour connaître combien d' | La fonction **Serial.available()** est toujours utilisée pour connaître combien d' | ||
- | Dans le code Pure Data, il y a un petit algorithme très pratique pour afficher dans Pure Data les données venant de la Arduino. Il consiste à stocker dans un objet **[list]** toutes les données les unes à la suite des autres ([list prepend]), puis de l' | + | Dans le code Pure Data, il y a un petit algorithme très pratique pour afficher dans Pure Data les données venant de la Arduino. Il consiste à stocker dans un objet **[list]** toutes les données les unes à la suite des autres ([list prepend]), puis de l' |
{{.: | {{.: | ||
Ligne 109: | Ligne 316: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | Méthodes pour recevoir les caractères ASCII | ||
+ | {{: | ||
===== serialEvent() ===== | ===== serialEvent() ===== | ||
Ligne 194: | Ligne 404: | ||
{{.: | {{.: | ||
- | Pour le code Arduino, | + | Pour le code Arduino, on découpe une nouvelle fois pour récupérer le second argument. On ajoute aussi nos fonctions. |
<code cpp> | <code cpp> |