Introduction: Arduino & C# - Robotic Arm Control With Pc and Arduino
Hello world! Today i made a windows application with c# to control a robotic arm such as the SainSmart Servo controlled Robot Arm.
You can control anything with servos with this app, I added a option to control a automated program for the robot arm to execute, you can set 4 different automated programs in the arduino code. Or Use the Slider controls and operate the robotic arm manually. I Don't even have the robotic arm but this will work for anything with servos. I just have 3 servos in the video but all sliders and buttons are tested and work. ? Open Source! so you can add more automated programs, buttons and sliders yourself. you can set-up your automatic programs in the source code of the c# application, the buttons are already pre-set with the commands that the arduino needs to receive. There is one example Automated program in the arduino code, you can copy this and add more automated programs, more instructions are in the code itself. Follow the next step for the Schematic, Parts list code and c# Source + pre-build application. I used visual studio 2013 for this.
Files you modify in the C# source are the following. Form1.cs & Form.1Designer.cs
To modify the look of the Application you simply double click on Form1.cs and the Form1.cs [Design] should pop up. You can now drag and drop buttons and whatever you want from the toolbox, and change background in the properties etc. If adding a button for example, double click the button to give it a function, Double clicking it will bring you to the part of the code that belongs to the button.
You can also change the about box by double clicking on the about box AboutBox1.cs, You can change background, font, colors etc.
To change company name, version etc. you can double click Properties in the [solution explorer]. And then at [application] click on [assembly information], you can also modify AssemblyInfo.cs directly.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Schematic, Parts List and Code + C# App Source
Just wire it up like the schematic and it should work fine, you could use a sensor shield or something, which might be better when using 6 servos i only used 3 the the video which worked fine.
- Arduino uno, or mega
- Sensor shield for servos (optional)
- 6 or 7 x servos.
- Jumper wires set MM/FF/MF
- Windows application (don't need to build it yourself there is a pre-build program included in downloads)
- Visual studio 2013 (optional)
Follow me for more!
Check out our website! Arduinosensors.nl
Follow my youtube channel!
https://github.com/vandenbrande/BlueCore-Tech-Servo-Control-C-Application Full source can be found on github to.