What language should i better use to program my laptop? I am going to make a robot using my laptop?I am new to programming in pc and i am looking for some tutorials explaining how to use serial port too.
Thanks in advance.
What language should i better use to program my laptop? I am going to make a robot using my laptop?I am new to programming in pc and i am looking for some tutorials explaining how to use serial port too.
Thanks in advance.
What, if any, programming experience do you currently have?
There are several choices that are relatively easy to acquire. If we have some insight into what you currently are familliar with it could potentially make the learning curve somewhat less, um, challenging.
If you want to get started programming in robotics read on.
Robotic Claw Starter Kit
Step 1. Buy some cool hardware so we can make a robotic claw to grab stuff, all for only $128.78!
1a) Purchase the hardware that will talk to our PC and our robotic claw. $39.95.
SSC-32 Servo Controller
lynxmotion.com/Product.aspx?productID=395&CategoryID=52
2a) Buy a claw that can grab things! $40.98
Little Grip Kit (with servos)
lynxmotion.com/Product.aspx?productID=160&CategoryID=
3a) Get a battery $12.95
6.0 Volt Ni-MH 1600mAh Battery Pack
lynxmotion.com/Product.aspx?productID=331&CategoryID=48
4a) Get a wiring harness to connect our battery to our Servo Control. $4.95
lynxmotion.com/Product.aspx?productID=497&CategoryID=44
5a) Buy a cable to connect our PC to our Servo Controller $29.95
lynxmotion.com/Product.aspx?productID=699&CategoryID=44
Step 2. While your waiting for your hardware to arrive at the front door we can start working on the software that we will use to program our claw.
2a) Download and install Microsoft Visual Basic 2008 Express Edition
microsoft.com/express/download
2b) Download SERV-O-MATIC Slider Software - Visual Basic .NET
otherrobots.com/Downloads/ta … fault.aspx
2.1 Create a new directory c:\ServoMaticSlider and save the file in step two above “ServoMaticSlider.zip” to your new directory c:\ServoMaticSlider
2.2 Open the directory c:\ServoMaticSlider. You should see a file ServoMaticSlider.zip. Right click on that file and choose Extract All… A wizard should appear. Just keep hitting next and finish.
2.3 You should now have a directory called C:\ssc32\ServoMaticSlider and inside that directory you should have a file ServoMaticSlider.sln. Double click that file. It should then open up in Visual Studio Express.
Press the F5 key (this will start the program).
Now you need to open a communication port to your SSC32 so you can send those commands.
4.1 From the menu bar select Setup > Serial Connection (the frmSerial form should appear).
4.2 Choose the com port from the list that your SSC32 is attached to.
4.2 Click the open button and it should say it opened the port in the window above.
4.3 Type in ver and click Send and it should give you the version of software running on your ssc32. If it did that then we know it’s talking to the SSC32.
4.4 Minimize that window so we can see the main screen again.
Move the sliders up and down. It should send the commands to your SSC32 and the claw should move.
To learn more about programming in general go here.
Go through the tutorial on Developer Basics
msdn.microsoft.com/en-us/rampup/default.aspx
In most circumstances the serial port appears as a file that is opened and either data printed to or read from. The programming application can be something as simple as a batch file made using notepad, to any number of more complex programming languages. Different forms of basic programming are fairly straight foward and may be a place to start.
Br549 .
Thanks your advice are really helpful.
One question: can i connect sensors?and were i will connect them to the ssc-32?
Yes. You plug them into the pins marked “10” on the diagram at the top of the manual (lynxmotion.com/images/html/b … tm#readain) discusses reading the sensors attached to those 4 ports.
The SSC32 can read data from up to four sensors.
See Number 10 in the image below.
A B C D
You can read about and download a program that can read data from the ssc32 here.
otherrobots.com/Tutorials/SSC32ServoControllerSoftware/tabid/58/Default.aspx
Read Digital Inputs.
Example: "A B C D AL BL CL DL "
A, B, C, and D are normal input reads. They read the value on the input as a binary value. It returns ASCII “0” if the input is a low (0v) or an ASCII “1” if the input is a high (+5v).
AL, BL, CL, and DL are latching input reads. They return the value on the input as an ASCII “0” if the input is a low (0v) or if it has been low since the last *L command. It returns a high (+5v) if the input is high and never went low since the last *L command. Simply stated, it will return a low if the input ever goes low. Reading the status simply resets the latch.
The ABCD inputs have a weak pullup (~50k) that is enabled when used as inputs. They are checked approximately every 1mS, and are debounced for approximately 15mS. The logic value for the read commands will not be changed until the input has been at the new logic level continuously for 15mS. The Read Digital Input Commands can be grouped in a single read, up to 8 values per read. They will return a string with one character per input with no spaces.
Read Digital Input Example: "A B C DL "
Read Analog Inputs.
Example: "VA VB VC VD "
VA, VB, VC, and VD read the value on the input as analog. It returns a single byte with the 8-bit (binary) value for the voltage on the pin.
When the ABCD inputs are used as analog inputs the internal pullup is disabled. The inputs are digitally filtered to reduce the effect of noise. The filtered values will settle to their final values within 8mS of a change. A return value of 0 represents 0vdc. A return value of 255 represents +4.98vdc. To convert the return value to a voltage, multiply by 5/256. At power up the ABCD inputs are configured for digital input with pullup. The first time a V* command is used, the pin will be converted to analog without pullup. The result of this first read will not return valid data.
Read Analog Input Example: "VA VB "
This example will return 2 bytes with the analog values of A and B. For example is the voltage on Pin A is 2vdc and Pin B is 3.5vdc, the return value will be the bytes 102 (binary) and 179 (binary).
The above is from the SSC32 manual
lynxmotion.com/images/html/build136.htm
Furthermore, when i run the microsoft visual basic 2008 from your link it “cannot establish connection with the server” it says.
Are you talking about not being able to view this link?
2b) Download SERV-O-MATIC Slider Software - Visual Basic .NET
otherrobots.com/Downloads/ta … fault.aspx
ok that worked!
so there are only for inputs/outputs for sensors
the A B C D in the 10 of the image?
Correct, only four. Hopefully they will add a few more in the next release of the board. At least one can always hope.
do you know where the next release is coming?
because i need more sensor in/out s
I think you could probably use a Multiplexer chip.
If you are handy with a soldering iron you can DIY your own multiple inputs.
lynxmotion.net/phpbb/viewtopic.php?t=5093
sparkfun.com/commerce/produc … cts_id=299
sparkfun.com/commerce/produc … ts_id=9056
sparkfun.com/datasheets/IC/CD74HC4067.pdf
mouser.com/Search/Refine.asp … CD74HC4067
HOw can i make the multiplexer chip ?(to multiply my sensors.
Maybe Zoomkat should post a schematic.
I wouldn’t mind seeing that too. What code changes would need to go along with a multiplexer? Would the firmware need to be updated?
You can easily mark up your own schematic if desired. I’ve been working with the CD74HC4051, but the below CD74HC4067 will give 16 inputs so is probably a better choise to work with. Look at the pinouts on the below data sheet. The VCC connects to the +5v on the ssc-32, the ground and E bar connects to the ssc-32 ground. The common input/output connects to an analog input pin on the ssc-32. The S0-S3 connect to four servo control signal pins such as P0-P3. I connected a 47k resistor between each S pin and ground to ensure the chip control lines don’t float. The truth table shows how control the chip S inputs to select between the sixteen I lines. Your ssc-32 control programming would set the ssc-32 control signal pins in the logic desired to align the desired chip input line to the ssc-32 analog input pin. An example might be #0H #1H #2H #3H to align I15 to the analog input pin. Then you would issue a command like VA to read the current input value of that analog input pin.
mouser.com/Search/ProductDet … Jhbp9Pk%3d
ti.com/lit/gpn/CD74HC4067
Hi Nikatlas,
This is Laracroft,
I read your post, your confusion about which language is better for programming on laptop specially when if you want to use serial port.
Your solution is to use Java Language which is open source and API is available on sun.java.com for accessing serial port of your system.
You can also find some tutorial to use this API.
Stay connected to this forum.