Asked
— Edited

i'm using connection number 3 whit 3 pwm's for controling LeD's . i'm using a script to controle the LED'S . how do i ad a connection to my script ? how does my script know whits iotiny i use ?
Related Hardware EZ-B IoTiny
@athena
were in the line do i specifie BoardIndex ?
You can specify the
BoardIndex
at the beginning of your script or before any command that needs to be sent to a specific connection. Here is an example of how to include theBoardIndex
command in your script:Example Script in EZ-Script
Explanation:
BoardIndex(3)
: This command sets the active board index to 3. All subsequent commands will be sent to the board at connection 3.PWM(D0, 100)
: This command sets the PWM value on digital port D0 to 100.Set(D1, ON)
: This command sets digital port D1 to high (turns on the LED).Set(D2, OFF)
: This command sets digital port D2 to low (turns off the LED).By placing the
BoardIndex
command at the beginning of your script, you ensure that all subsequent commands are directed to the specified connection (in this case, connection 3). If you need to switch to a different connection later in the script, you can use theBoardIndex
command again to specify the new connection.If you have any further questions or need additional assistance, please let me know!
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
@Nomad, I found this in the EZ Script commandd section of the Support section here:
Multiple EZ-B Boards: ARC supports multiple physical EZ-B Boards connected to your computer.You can specify the board by putting the board number in front of the port. Forexample: Servo(2.d0, 8) will move the D0 servo on EZ-B board #2 toposition 8. If no board index is specified, the first board (zero) is assumed.If using more than one board, the first board is always responsible formovement panels. <------
So your EZ Script command for connection 3 will look something like this:
PWM(2. D0, 100)
Connection 1 is in the zero connection slot of ARC's connection skill. So your 3rd EZB is listed as 2 in your script.
#dave
thats what i tough also but it doesn work . i took a new projecht whit only the rgb an it doesn eather work . not on iotiny or ezbv does the rgb work . not even a simpel one color .
:loop sleep(200) pwm(3,d0,0) pwm(3,d1,0) pwm(3,d2,0) sleep(1000) pwm(3,d0,100) pwm(3,d1,100) pwm(3,d2,100) sleep(200) goto(loop)
If that's your script then problem is you are using commas between The board connection and the next entry. You need to use a period (.).
PWM(2. D0, 100)
Also, how many ezbs do you have on your robot? Is the iotiny The fourth one? If it's the third then you should have The number two at the beginning of your command not a three.
@dave
got it . its whithout spaces . pwm(2.d0,100) i was confused by the led and rgb . the rgb is connection 3 en the led is connection 2 i use two ezbv and two iotiny's .
thank you
Outstanding! I'm glad you were able to get your script running. Congratulations. I know that's a good feeling.
Now that I'm learning and writing JavaScript I'm getting a bit rusty on EZ Script. I wasn't aware that you couldn't have spaces in EZ Script. I thought you could and haven't been able to test that out. In JavaScript it's encouraged for readability.
If you need to find more proper EZ Script commands there are several ways. You can look through the script help on the right side in the EZ Script tool. You can also Enable Intellisense Checkbox at the top of the script skill and ARC will suggest proper commands as you type. Lastly you can look through the available list of EZ Script commands in the Support section here. You should probably consider bookmark this or print the commands out. I did. Here's the link:
All EZ Script commands
@dave
one part to print and i got the hole inmoov . the connection is not stable enough yet . my worries is the 6 volt for the big servo . i have now a iotiny in the head whit ez robot servo's . on 7 volts , no worries here . for the front low emblem iotiny also no worries here cause no servo's wil be used there . only a RGB. so that leaves only the two ezbv4 for the big servo's . all small regulators have now some 7 volts . tinkering to do here . question . is it possible that a ezbv4 or iotiny change its IP adres ? or mixed up IP's ?
cool backpanel .:)
sorry for late respons . i dont have sounds in my telenet mailbox .