
odt
Italy
Asked
— Edited
Hello.
I am trying to use visual basic for controlling ez-board, but i have some difficult about beginning using it. I have read your tutorial and every post in this forum, but i still have not understand where i have to declare ezb.
Imports EZ_B Imports EZ_B.CameraDetection Imports System
......where do i have to write these lines? In 'sub form load'? In every buttons?
At the moment, i want a project with only a form and a button. Pressing the button, a servo must move to 50%. Can someone please suggest how to do this?
Thank you very much.
Ema from Italy
you need to add the ez_b.dll as a reference to your project, then you can declare ez_b , and you will have a small toolbar etc..
watch the beginning of the video, dj will show how to do this with the VB SDK. he will then show you basic usage...
so enter your code in any user/click event.like this one will load with the form, but will control trackbar1
how much experience do you have with vb?.... it's muck easier to use EZ_Builder controls all you have to do is change the ports to your config. or if you want to use EZ_Scripting
I have whatched videotutorial, but i don't understand english very well, so i have understood less.....
I have added ezb_dllas reference as tutorial said.
But now, i don't know what to do.
My project is loading. Sub form load: EZ_B.Servo.SERVo_Min is an error because it was not declared..........
Lei deve aggiungere l'ez_b. il dll come un riferimento al suo progetto, poi lei può dichiarare ez_b e lei avrà una piccola barra degli strumenti ecc.
Guardare l'inizio del video, dj mostrerà come fare questo con il VB SDK. La mostrerà poi l'uso fondamentale...
così entrare il suo codice in qualunque operatore/scatto per che avvenimento.amando questo caricherà con la forma, ma controllarà trackbar1
Quanta esperienza lei ha con il vb? .... è il letame più facile usare EZ_Builder i controlli tutto lei deve fare è il cambiamento i porti al suo config. o se lei vuole usare EZ_Scripting?
Hi Odt,
Welcome to the inspiring community of EZ-B !
I assume you already have the 'EzB_Connect1' control on your form. If not, follow the tuturial and do so first. Suppose you have a button on your form and that button is named 'btnLeftTurn'. You can past this line of code in the 'click' event of that button. So draw a button on the screen, double click it and you'll end up in this click event. At the end of the line you'll see 'D7,0'. This means your servo has to been connected with port D7 on your EZ-B board. The '0' means the minimum value of the servo.
Private Sub btnLeftTurn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLeftTurn.Click EzB_Connect1.EZB.Servo.SetServoPosition(EZ_B.Servo.ServoPortEnum.D7, 0) End Sub
If you want to toggle between minimum and maximum values, you could place a second button, let's call this one 'btnRightTurn'. Here you can past this line of code:
Private Sub btnRightTurn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRightTurn.Click EzB_Connect1.EZB.Servo.SetServoPosition(EZ_B.Servo.ServoPortEnum.D7, 100) End Sub
Now you'll notice the 'D7,100' instead of '0', so the servo will move to the 'other side'.
Good luck and enjoy it.
Thanks to all. I have understand and now i am able to move servos, but i have another strange problem about camera detection.
Following the examples in sdk-folder (tutorial 3), i have an error: "FileNotFoundException Impossible to load file or assembly FFMPEG.dll or one of dependence".
Well, i have added in 'project - add reference' the FFMPEG.dll and every other .dll files, but the error is still here.... Do someone know why?
Thank you.
Ema from Italy
I have spent many time trying to understand this error, but no lucky.
Does someone has connected a camera using VisualBasic? Can i have some explanation about?.....
Thank you and scuse me for my newbie and for my bad english.
Ema from Italy.
have you loaded the example in the EZ-SDK ZIP file? There is a camera example for Visual Basic