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 | ||
projets:tourne-data:accueil [2020/09/07 13:06] oyomaker [Description] |
projets:tourne-data:accueil [2020/09/07 13:22] (Version actuelle) oyomaker [Description] |
||
---|---|---|---|
Ligne 37: | Ligne 37: | ||
===== Matériaux ===== | ===== Matériaux ===== | ||
- | Liste de matériel et composants nécessaires. | + | Liste de course a faire avant septembre pour avoir de quoi decliner 5 modèles fin septembre : |
+ | - [[https:// | ||
+ | - [[https:// | ||
+ | - [[https:// | ||
- | ===== Tutoriel | + | === todo=== |
- | Guide pas à pas pour la réalisation du projet. | + | dessiner les 5 modèles/ |
+ | ===== DEV ===== | ||
+ | ==== Arduino Mozzi ==== | ||
+ | ++++ Le codebase de test (sinusoide frequence variable (potentiometre) | ||
+ | <code c+> | ||
+ | /* Example playing a sinewave at a set frequency, | ||
+ | using Mozzi sonification library. | ||
+ | | ||
+ | Demonstrates the use of Oscil to play a wavetable. | ||
+ | | ||
+ | Circuit: Audio output on digital pin 9 on a Uno or similar, or | ||
+ | DAC/A14 on Teensy 3.0/3.1, or | ||
+ | check the README or http:// | ||
+ | | ||
+ | Mozzi help/ | ||
+ | https:// | ||
+ | | ||
+ | Tim Barrass 2012, CC by-nc-sa. | ||
+ | */ | ||
+ | |||
+ | //#include < | ||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | |||
+ | // use: Oscil < | ||
+ | Oscil < | ||
+ | |||
+ | // desired carrier frequency max and min, for AutoMap | ||
+ | const int MIN_CARRIER_FREQ = 22; | ||
+ | const int MAX_CARRIER_FREQ = 440; | ||
+ | const int KNOB_PIN = 0; // Pitch | ||
+ | |||
+ | // use #define for CONTROL_RATE, | ||
+ | #define CONTROL_RATE 64 // powers of 2 please | ||
+ | |||
+ | AutoMap kMapCarrierFreq(0, | ||
+ | float smoothness = 0.95f; | ||
+ | Smooth < | ||
+ | |||
+ | void setup(){ | ||
+ | startMozzi(CONTROL_RATE); | ||
+ | Serial.begin(115200); | ||
+ | aSin.setFreq(440); | ||
+ | } | ||
+ | |||
+ | |||
+ | void updateControl(){ | ||
+ | // put changing controls in here | ||
+ | int freqVal = mozziAnalogRead(KNOB_PIN); | ||
+ | //int FRQ = mapThis(freqVal); | ||
+ | aSin.setFreq(freqVal); | ||
+ | } | ||
+ | |||
+ | |||
+ | int updateAudio(){ | ||
+ | return aSin.next(); | ||
+ | } | ||
+ | |||
+ | |||
+ | void loop(){ | ||
+ | audioHook(); | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | </ | ||
+ | ++++ | ||
===== Photos ===== | ===== Photos ===== | ||
- | Code pour afficher les images du projet : | + | {{gallery>?& |
- | < | + | |