Home AMX User Forum AMX General Discussion

Noob with a couple of questions

2»

Comments

  • the8thstthe8thst Posts: 470
    You will get a much warmer response and many more helpful answers if you post the section of code that is prompting you to ask the question. It doesn't matter if the code works or not and it doesn't need to be the whole file, but it lets us all know that you have attempted to figure something out. It also gives us a concrete starting point for answering the question.

    The last tip about posting code is to please use code tags. [ code ]code sample gets pasted here...[ /code ] (remove the spaces between within the brackets to make the above work.
  • Spire_JeffSpire_Jeff Posts: 1,917
    First, let me welcome you to the AMX community. We can be a lot dysfunctional, but we aren't that bad once you learn to be one of us. There have been many good points made here and I hope we can all be friends as we try to understand the perspectives of everyone involved.

    On to the IR question. IR ports are controlled with PULSE[dev,chan], ON[dev,chan], OFF[dev,chan], TO[dev,chan] and SEND_COMMAND dev,"'SP',chan"; You can get further info on these commands from the NetLinx Keywords help file.

    I remember when I first started. I was confused and annoyed by NetLinx code. Then, in a flash, I got it. Once you understand a couple of the basic concepts, everything else falls into place. Unfortunately, I am on a tight schedule and I am not the best teacher, so I cannot really expand on this at the moment. Once you understand Events, Channels, Addresses, and a couple other concepts, your coding experience will takeover and you will most likely excel at creating control systems.

    Jeff
  • the8thstthe8thst Posts: 470
    Spire_Jeff wrote: »
    On to the IR question. IR ports are controlled with PULSE[dev,chan], ON[dev,chan], OFF[dev,chan], TO[dev,chan] and SEND_COMMAND dev,"'SP',chan"; You can get further info on these commands from the NetLinx Keywords help file.

    Jeff

    Don't worry Jeff. I posted a link to a pdf file from the AMX prog 1&2 training docs that walk you through all of the basic concepts one step at a time (although I have a feeling the OP ignored it).

    The PDF file was actually the first result when I googled "netlinx programming tutorial", so I really feel the OP should have been able to find it on his own.
  • mpullinmpullin Posts: 949
    Spire_Jeff wrote: »
    I remember when I first started. I was confused and annoyed by NetLinx code. Then, in a flash, I got it. Once you understand a couple of the basic concepts, everything else falls into place.

    Same here, yo. Here is another tip: ON has nothing to do with event handling. (imagine that) It's a command that sets the following variable to 1.
    ON[dvTV,1] // starts firing the IR code in slot 1, if dvTV is an IR device
    WAIT 2 OFF[dvTV,1] // after .2 seconds, stops firing the IR code in slot 1
    
    ON[nDidWeControlTv] // provided the integer variable nDidWeControlTv exists, sets nDidWeControlTv to 1.
    
  • mushmush Posts: 287
    G'day Goran

    Welcome to the world of AMX.
    How is it all going?

    Cheers
Sign In or Register to comment.