Machine a fumée arduino

Bonjour,
cela fais plusieurs jour que je recherche sans succès..
J'ai une machine a fumée qui se contrôle en dmx, je voudrais la déclencher et l'arrêter avec un arduino.
Je possède un Arduino uno et un DMX shield CTC-DRA-10-R2 qui est dessus, mon problème et que j'ai aucune idée de comment faire le programme.
J'ai trouvé des sujets et des tutos mais que pour contrôler des projecteur avec plusieurs canaux de lumières.
J'ai installé la librairie DMXSimple mais quand je charge les exemples je ne comprend pas grand chose a part éventuellement assigner un canal que je règlerais sur ma machine a fumée.

Est ce que vous pourriez m'aider?

Merci beaucoup.

Bonjour

Les commandes DMX à utiliser sont decrites dans le manuel de la MaF

voilà ! avec les infos du manuel , c'est simple d'utiliser l'exemple fadeup de la lib

Je suis désolé mais je n'y arrive pas sur le fadeup je ne vois pas où régler l'adresse dmx de ma machine.
Sur des forum ils parlent aussi de changer des broche sur le shield pour transfert de code, je suis totalement perdu.

Après sur le manuel qui est juste une feuille A4 il y a ecris:
dmx channel:
1.smoke
2.r-led
3.g-led
4.b-led
etc..

Mais je ne sais pas ou mettre la Channel 1 dans le programme
Je pense comprendre que dans dmxsimple.write si je met brightness++ sa correspond a ON pour la fumée non ?


#include <DmxSimple.h>

void setup() {
  /* The most common pin for DMX output is pin 3, which DmxSimple
  ** uses by default. If you need to change that, do it here. */
  DmxSimple.usePin(3);

  /* DMX devices typically need to receive a complete set of channels
  ** even if you only need to adjust the first channel. You can
  ** easily change the number of channels sent here. If you don't
  ** do this, DmxSimple will set the maximum channel number to the
  ** highest channel you DmxSimple.write() to. */
  DmxSimple.maxChannel(100);
}

void loop() {
  int brightness;
  /* Simple loop to ramp up brightness */
  for (brightness = 0; brightness <= 255; brightness++) {
    
    /* Update DMX channel 1 to new brightness */
    DmxSimple.write(1, brightness++);
    
    /* Small delay to slow down the ramping */
    delay(100);
  }

}



essaye ce code
normalement met ON la MaF et l'eclairage

/* Welcome to DmxSimple. This library allows you to control DMX stage and
** architectural lighting and visual effects easily from Arduino. DmxSimple
** is compatible with the Tinker.it! DMX shield and all known DIY Arduino
** DMX control circuits.
**
** DmxSimple is available from: http://code.google.com/p/tinkerit/
** Help and support: http://groups.google.com/group/dmxsimple       */

/* To use DmxSimple, you will need the following line. Arduino will
** auto-insert it if you select Sketch > Import Library > DmxSimple. */

#include <DmxSimple.h>

void setup() {
  /* The most common pin for DMX output is pin 3, which DmxSimple
  ** uses by default. If you need to change that, do it here. */
  DmxSimple.usePin(3);

  /* DMX devices typically need to receive a complete set of channels
  ** even if you only need to adjust the first channel. You can
  ** easily change the number of channels sent here. If you don't
  ** do this, DmxSimple will set the maximum channel number to the
  ** highest channel you DmxSimple.write() to. */
  DmxSimple.maxChannel(4);
}

void loop() {
  
  
  
    
    DmxSimple.write(1, 255); // fumée ON
    DmxSimple.write(2, 255); //Rouge ON FULL
    DmxSimple.write(3, 127); //Vert ON 50%
    DmxSimple.write(4, 64); // Bleu ON 25 %
    // DmxSimple.write(1, 0); // fumée  OFF
    /* Small delay to slow down the ramping */
    delay(10);
  }


j'ai bien téléversé le code cela n'a aucun effet sur la machine :confused:
Il y a peu être une histoire de cavalier sur le shield ?

Bonne photo de ton shield ?
edit : repondu + haut implanté sur quoi? uno, mega, autres ?

Il est sur une UNO r3

Là le dmx est a gauche mais j'ai essayé a droite aussi au cas où

A priori
il faut mettre ton shield en master (TX)
et le définir dans le programme en pin 4

Et pour le mettre dans ce mode c est avec les cavaliers.?
Je regarde ça demain je ne suis plus sur place je te remercie beaucoup de ton aide en tout cas :relaxed:

Bon j'ai réussis avec une autre librairie, je poste le code si ca peut servir.

Merci

/*
  DMX_Master.ino - Example code for using the Conceptinetics DMX library
  Copyright (c) 2013 W.A. van der Meeren <danny@illogic.nl>.  All right reserved.

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 3 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/


#include <Conceptinetics.h>


//
// CTC-DRA-13-1 ISOLATED DMX-RDM SHIELD JUMPER INSTRUCTIONS
//
// If you are using the above mentioned shield you should 
// place the RXEN jumper towards pin number 2, this allows the
// master controller to put to iso shield into transmit 
// (DMX Master) mode 
//
//
// The !EN Jumper should be either placed in the G (GROUND) 
// position to enable the shield circuitry 
//   OR
// if one of the pins is selected the selected pin should be
// set to OUTPUT mode and set to LOGIC LOW in order for the 
// shield to work
//


//
// The master will control 100 Channels (1-100)
// 
// depending on the ammount of memory you have free you can choose
// to enlarge or schrink the ammount of channels (minimum is 1)
//
#define DMX_MASTER_CHANNELS   4 

//
// Pin number to change read or write mode on the shield
//
#define RXEN_PIN                2


// Configure a DMX master controller, the master controller
// will use the RXEN_PIN to control its write operation 
// on the bus
DMX_Master        dmx_master ( DMX_MASTER_CHANNELS, RXEN_PIN );


// the setup routine runs once when you press reset:
void setup() {             
  
  // Enable DMX master interface and start transmitting
  dmx_master.enable ();  
  
  // Set channel 1 - 50 @ 50%
  dmx_master.setChannelRange ( 1, 25, 127 );
  dmx_master.setChannelRange ( 4, 25, 127 );
}

// the loop routine runs over and over again forever:
void loop() 
{
  static int dimmer_val;
  
  // Keep fading channel 1 in from 0 to 100%
  dmx_master.setChannelValue ( 1, 255 ); 
  dmx_master.setChannelValue ( 4, 255 );  
  
  delay ( 100 );
}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.