Controlling AUX1 Production studio from a arduino Ethernet.

8 posts / 0 new
Last post
Offline

Location

Zwolle
Netherlands
Joined: 30/01/2017
Posts: 6
Controlling AUX1 Production studio from a arduino Ethernet.

Hello All,

I recently have build several ATEM controllers based on the Skaarhoj library's all controling ATEM TVS and it works awesome ! Ordered the pcb's from Skaarhoj and switches from RJS. Thats all working fine.

For my new challenge I have been struggling with the following problem: i have an ATEM Production studio 4K (software version 6.9) using 12 buttons to control program, preview, cut, auto functions and want to use 2 buttons to switch between aux sources. And thats where i get stuck ! My buttonlighting works fine (when i change the AUX on the front of the mixer or on the software control panel the color of the button changes as i programmed it to do.

Pushing the button however doenst do anything ! i added line wich sends something to my serial debugger so i can see that the button is pushed down.
-------------------------------------------------------------------------------
CODE:
 
// 1B8: "Program on AUX"
  if (buttons.isButtonIn(8, buttonDownPress))  {   // Executes button command if pressed:
    buttons.setButtonColor(8,4);
    AtemSwitcher.changeAuxState(1,10010); //10010 = ME1 PRG
    Serial << F("PRG to AUX 1\n"); //Debug
  }
    buttons.setButtonColor(8, AtemSwitcher.getAuxState(1)==10010 ? 3 : 5);  // Sets color of button to RED (3) if it's active on AUX1
-------------------------------------------------------------------------------

I hope someone knows what i am missing !

ElecDev : Have a vision to develop

ATEM TVS HD, ATEM TVS, Production studio 4k, 1M/E, Hyperdeck intensity & shuttle, Videoassist, and several mini/micro converters.

 

Offline

Location

Leeds
United Kingdom
Joined: 12/07/2015
Posts: 81
Use newer library

Hi.

 

it looks like you're using the older ATEM library and not the more up to date ATEMstd, ATEMmin, ATEMmax or ATEMext libraries. Kasper has mentioned a few times in previous posts that support for the original ATEM library isn't guaranteed as it's not kept up to date.

You may may have to change your code a little to use the right syntax but it's worth changing over as it gets updated and has more features. 

See https://github.com/kasperskaarhoj/SKAARHOJ-Open-Engineering/tree/master/... for the latest libraries and  http://skaarhoj.com/fileadmin/BMDPROTOCOL.html for the new syntax. 

Looks like you'll be using AtemSwitcher.setAuxSource(0,10010) instead of changeAuxState. (Note aux 1-6 is 0-5)

I hope this helps. 

ATEM 2 M/E 4K, ATEM 1 M/E 4K, HyperDeck Studio Pro 4K, DeckLink Mini Recorder

Custom SKAARHOJ based controller

 

Offline

Location

Zwolle
Netherlands
Joined: 30/01/2017
Posts: 6
Older library

I thought i was using the newest library. I think i made a mistake and accidently loaded the older library.

I will give it a try thanks for the response!

ElecDev : Have a vision to develop

ATEM TVS HD, ATEM TVS, Production studio 4k, 1M/E, Hyperdeck intensity & shuttle, Videoassist, and several mini/micro converters.

 

Offline

Location

Zwolle
Netherlands
Joined: 30/01/2017
Posts: 6
New lib's : Delay problem

You were right that i was using the older libs :-/  I have to rewrite al 'few' lines of code now.

Stumbling upon command that are all changed mostly easy to find thank to the Skaarhoj BMDProtocol list. 

But i am stuck at the 'delay'

I used to do:

AtemSwitcher.delay (DelayTime);

I do this to give my PTZ camera's a little time to reach their preset position before i perfom an AutoME

In the newer libs this command doesn't exist anymore but i cant find the replacement ?

I am using the ATEMmin on a simple Arduino ethernet.

ElecDev : Have a vision to develop

ATEM TVS HD, ATEM TVS, Production studio 4k, 1M/E, Hyperdeck intensity & shuttle, Videoassist, and several mini/micro converters.

 

Offline

Location

Leeds
United Kingdom
Joined: 12/07/2015
Posts: 81
ElapsedMillis

Yeah, you can't just use the delay(); command as the the delay pauses and breaks the communication to the ATEM unit.  I've found using the "elapsedmillis" function works well.  Find the info here:

http://playground.arduino.cc/Code/ElapsedMillis

 

ATEM 2 M/E 4K, ATEM 1 M/E 4K, HyperDeck Studio Pro 4K, DeckLink Mini Recorder

Custom SKAARHOJ based controller

 

Offline

Location

Zwolle
Netherlands
Joined: 30/01/2017
Posts: 6
AtemSwitcher.delay (DelayTime);

I know that i cant use the 'normal' arduino wait or delay commands.

But the previous library from Skaarhoj had an delayfunction "AtemSwitcher.delay (DelayTime);"

I cant find this function or similair function in the newest library.

ElecDev : Have a vision to develop

ATEM TVS HD, ATEM TVS, Production studio 4k, 1M/E, Hyperdeck intensity & shuttle, Videoassist, and several mini/micro converters.

 

Offline

Location

Leeds
United Kingdom
Joined: 12/07/2015
Posts: 81
Exactly. There is no delay

Exactly. There is no delay function built in to the latest Skaarhoj library. I use elapsedmillis. 

ATEM 2 M/E 4K, ATEM 1 M/E 4K, HyperDeck Studio Pro 4K, DeckLink Mini Recorder

Custom SKAARHOJ based controller

 

Offline

Location

Zwolle
Netherlands
Joined: 30/01/2017
Posts: 6
Thanks bradders for pointing

Thanks bradders for pointing me in the right direction.

I am now using the elapsMilles library and it works like a charm ! I even have got more possibilities than with the 'old' library and the delayfunction.

ElecDev : Have a vision to develop

ATEM TVS HD, ATEM TVS, Production studio 4k, 1M/E, Hyperdeck intensity & shuttle, Videoassist, and several mini/micro converters.