Aller au contenu


Contenu de vins86

Il y a 27 élément(s) pour vins86 (recherche limitée depuis 10-juin 13)



#97793 Arduino to Atem

Posté par vins86 sur 25 juillet 2018 - 11:11 dans Autres projets inclassables

Bonjour,

 

Nous avons bien le " Serial started" qui s'affiche dans le moniteur série ainsi que "Sending connect packet to ATEM switcher on IP 192.168.1.105 from port 51707

"
 
Est-il possible de tester ce programme sans avoir besoin de bouton ou de fils à mettre?
 
Je voudrais être sûr que le code fonctionne avant.
 
Cordialement,
 
Vincent D



#97791 Arduino to Atem

Posté par vins86 sur 25 juillet 2018 - 10:54 dans Autres projets inclassables

Bonjour,

 

Je suis nouveau sur le forum.

 

Je me permet de venir vers vous car nous avons un problème de fonctionnement de notre code.

 

Afin de faire le nécessaire, nous avons téléchargé une librairie qui contient des fichiers d'exemple.

 

Nous avons testé un fichier d'exemple, mais nous avons aucun résultat.

 

A titre d'information, notre shield internet ne contient pas d'adresse MAC, nous avons donc laissé celui en exemple.

 

Voici le fichier d'exemple :

/*****************
 * Example: ATEM Library Functional test
 * Connects to the ATEM Switcher and sends a new command everytime digital pin 7 is HIGH on the arduino (connect a button with pull-down res.)
 * This is mostly an example for debugging a development of the library. However, it may serve as a reference for how to operate various functions in the Switcher.
 *
 * - kasper
 */
/*****************
 * TO MAKE THIS EXAMPLE WORK:
 * - You must have an Arduino with Ethernet Shield (or compatible such as "Arduino Ethernet", http://arduino.cc/en/Main/ArduinoBoardEthernet)
 * - You must have an Atem Switcher connected to the same network as the Arduino - and you should have it working with the desktop software
 * - You must make specific set ups in the below lines where the comment "// SETUP" is found!
 */





#include <SPI.h>         // needed for Arduino versions later than 0018
#include <Ethernet.h>


// MAC address and IP address for this *particular* Ethernet Shield!
// MAC address is printed on the shield
// IP address is an available address you choose on your subnet where the switcher is also present:
byte mac[] = { 
  0x90, 0xA2, 0xDA, 0x00, 0xE8, 0xE9 };		// <= SETUP
IPAddress ip(192, 168, 1, 99);				// <= SETUP


// Include ATEM library and make an instance:
#include <ATEM.h>

// Connect to an ATEM switcher on this address and using this local port:
// The port number is chosen randomly among high numbers.
ATEM AtemSwitcher(IPAddress(192, 168, 1, 105), 56417);  // <= SETUP (the IP address of the ATEM switcher)



void setup() { 

  // Start the Ethernet, Serial (debugging) and UDP:
  Ethernet.begin(mac,ip);
  Serial.begin(9600);  
  Serial.println("Serial started.");

  pinMode(7, INPUT);

  // Initialize a connection to the switcher:
  AtemSwitcher.serialOutput(true);
  AtemSwitcher.connect();
}

void loop() {
  // Check for packets, respond to them etc. Keeping the connection alive!
  AtemSwitcher.runLoop();

  AtemSwitcher.changeProgramInput(0); 
    
}

Dans l'attente de vous lire.

 

Bien cordialement,

 

Vincent D