Modifications

Aller à : navigation, rechercher

Run 2000

3 919 octets ajoutés, 17 avril 2018 à 06:16
-Inversion des couleurs pour le capteur lumière
|machines=Laser-Smoothignstech,
}}
 
== ''L'équipe'' ==
 
<gallery mode="packed">
File:Capture d’écran 2018-04-17.png
File:Capture d’écran 2018-04-17.png
File:Capture d’écran 2018-04-17.png
File:Capture d’écran 2018-04-17.png
</gallery>
== '''Concept''' ==
Enfin, dernière interaction, il y a deux fentes sur une face du cube dans lequel l'utilisateur peut passer une lame pour couper horizontalement ou verticalement la vidéo.
Dans cette expérience, c'est l'humain qui interagit directement avec son corps et ses mouvements.
 
 
<gallery>
schema-principe.png| Schéma du cube
pression-des-boutons.png| Schéma pression des boutons split
</gallery>
== '''Le cube''' ==
=== Code Processing : ===
Telecharger le code processing entier final:[[:File:test3.pde]]
==== -Mise en aléatoire des vidéos ====
int dernier;
==== -Inversion des couleurs pour le capteur lumière ====
 
<gallery mode="packed">
File:Capture d’écran 2018light-04-16 à 23.28.59normal.png|Image d'origineFile:Capture d’écran 2018avec-04-16 à 23.28.51light.png|Inversion des couleurs</gallery>    
void draw(){
if (lightValue < 4090) {
}
}
 
==== -Split screen ====
 
 
<gallery mode="packed">
File:Capture d’écran 2018-04-16 à 23.34.21split.png|SplitScreen1File:Capture d’écran 2018-04-16 à 23.34.12split2.png|SplitScreen2
</gallery>
 
 
 
//si le bouton 1 est actif on active le premier split screen
if(button1Value==1)
{
image(currentMovie, width/2, 0, width, height);
//println(opticalInterupt+"opticalInterupt");
}
else
{
println("no valuer");
}
//si le bouton 2 est actif on active le second split screen
if(button2Value==1)
{
image(currentMovie, 0, height/2, width, height);
//println(opticalInterupt2+"opticalInterupt2");
}
else
{
println("no valuer2");
}
 
//sinon pas de split screen
==== -Glitch ====
 
 
<gallery mode="packed">
File:Capture d’écran 2018-04-16 à 23.30.41glitch.png|Effet glitch sur l'image
</gallery>
 
void draw() {
}
=== Code Photon: ===
Telecharger le code photon entier final: [[:File:photon.ino]]
This #include statement was automatically added by the Particle IDE.
#include <TM1637Display.h>
// This #include statement was automatically added by the Particle IDE.
//#include <TM1637Display.h>
/*
Ping sensor HC-SRO4
+ grove 4-digit display
*/
//#include <TM1637Display.h>
#define CLK 2
#define DIO 3
TM1637Display display(CLK, DIO); int trigPin =D4;int opti =D1;int opti1 = Code PhotonD0;int echoPin = D5;float v = 331.5 + (0.6 * 20);int broche_flex = A0;int lightInput=A2;int button1=D6;int button2=D7; double button2Value; void setup(){ display.setBrightness(0x0d); Serial.begin(9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT);  pinMode(trigPin, OUTPUT); pinMode(broche_flex, INPUT); pinMode(opti,INPUT); pinMode(opti1,INPUT); pinMode(lightInput,INPUT); pinMode(button1,INPUT); pinMode(button2,INPUT);} void loop() // <3>{ double opticalInterupt = digitalRead(opti); double opticalInterupt2 = digitalRead(opti1); double lightValue=analogRead(lightInput); double button1Value=digitalRead(button1); button2Value=digitalRead(button2); float d=distanceCM(); float flex_capture = 4095 - analogRead(broche_flex);  //boolean appuyer=false; display.showNumberDec(d); display.showNumberDec(flex_capture);//Display the Variable value; display.showNumberDec(opticalInterupt); display.showNumberDec(opticalInterupt2); display.showNumberDec(lightValue); display.showNumberDec(button1Value); display.showNumberDec(button2Value); Serial.println(d); Serial.println(flex_capture); Serial.println(opticalInterupt); Serial.println(opticalInterupt2); Serial.println(lightValue); Serial.println(button1Value); Serial.println(button2Value); //Display the Variable value; //wait 100 milliseconds so we don't drive ourselves crazy delay(100); // ms envoyerJson(d, flex_capture,opticalInterupt,opticalInterupt2,lightValue,button1Value,button2Value);}// float Turnigy()// {// digitalWrite(Turnigy,LOW);// } float distanceCM(){ // send sound pulse digitalWrite(trigPin, LOW); delayMicroseconds(3); digitalWrite(trigPin, HIGH); delayMicroseconds(5); digitalWrite(trigPin, LOW);  // listen for echo Pin float tUs = pulseIn(echoPin, HIGH); // microseconds float t = tUs / 1000.0 / 1000.0 / 2; // s float d = t*v; // m return d*100; // cm}  void envoyerJson(float distance, float pression,float o,float o2,float l1,float b1,float b2) { String json;//On envoie les données à processing //json = "{\"controle\":{\"pot1\":"; json = "{\"distance\":"; json = json + String(distance); json = json + ",\"pression\": "; json = json + String(pression); json =json + ",\"opticalInterupt\":"; json = json + String(o); json = json + ",\"opticalInterupt2\":"; json = json + String(o2); json = json + ",\"lightValue\":"; json = json + String(l1); json = json + ",\"button1Value\":"; json = json + String(b1); json = json + ",\"button2Value\":"; json =json + String(b2); json =json + "}";  Serial.println(json);}
== '''L'installation finale''' ==
906
modifications

Menu de navigation