Controlling Microcontroller

Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
22 posts Page 2 of 3
Contributors
Filip
Coding Guru
Coding Guru
Posts: 833
Joined: Wed Jan 05, 2011 3:59 pm

Re: Controlling Microcontroller
Filip
Well,

I connected my robot (wich has MICROCONTROLLER onboard) and it recognized it.
CodenStuff wrote:
Nope, it's just your sick and dirty mind. You sick twisted warped little pervo :D
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Controlling Microcontroller
mandai
A USB port does not provide the same access as a Serial port.
Filip
Coding Guru
Coding Guru
Posts: 833
Joined: Wed Jan 05, 2011 3:59 pm

Re: Controlling Microcontroller
Filip
It's connected to USB
CodenStuff wrote:
Nope, it's just your sick and dirty mind. You sick twisted warped little pervo :D
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Controlling Microcontroller
mandai
I imagine you would need a driver in order to simluate a serial port over a USB connection.
Filip
Coding Guru
Coding Guru
Posts: 833
Joined: Wed Jan 05, 2011 3:59 pm

Re: Controlling Microcontroller
Filip
They were probably installed automaticlly
CodenStuff wrote:
Nope, it's just your sick and dirty mind. You sick twisted warped little pervo :D
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Controlling Microcontroller
mandai
If you have a SDK for such a device, or if your device presents itself as a serial port over USB then that might be the case.
User avatar
mika
Just Registered
Just Registered
Posts: 6
Joined: Tue Aug 09, 2011 11:52 am

Re: Controlling Microcontroller
mika
Nice! lmao;
Image
Image
Image
Image
User avatar
GaiaonlineHD
Member
Member
Posts: 40
Joined: Mon Jan 23, 2012 8:51 pm

Re: Controlling Microcontroller
GaiaonlineHD
visioncr0 wrote:
Hello,

This tutorial will show you how to connect to serial and write something in it.

Imports:
Code: Select all
Imporst System.IO.Ports
1. Listing all Serial(COM) ports to control (in code ComboBox)

This will get name of port
Code: Select all
Dim ports As String() = SerialPort.GetPortNames()
Code below will add ports to control (ComboBox)
Code: Select all
Dim port As String
        For Each port In ports
            ComboBox1.Items.Add(port)

        Next port
2. Connecting to port selected by user

Add this under Class
Code: Select all
Dim serialPort As New SerialPort
Code below will select serial port and open(connect) to it
Code: Select all
Try
                    serialPort.PortName = ComboBox1.SelectedItem
                    serialPort.Open()
Catch ex as exception 

End Try
Disconecting:
Code: Select all
serialPort.close()
serialPort.dispose()
3. Writing/reading to serial port
Writing:
Code: Select all
serialPort.Write("something")
Reading:
Code: Select all
Dim string As String = serialPort.ReadLine()
That's all

-visioncr0
Where do i put all of these codes its confusing :|
Filip
Coding Guru
Coding Guru
Posts: 833
Joined: Wed Jan 05, 2011 3:59 pm

Re: Controlling Microcontroller
Filip
Hey,

Here's the source code:
Controlling Microcontroler.rar
Hope it helps
You do not have the required permissions to view the files attached to this post.
CodenStuff wrote:
Nope, it's just your sick and dirty mind. You sick twisted warped little pervo :D
User avatar
benji_19994
VIP - Donator
VIP - Donator
Posts: 156
Joined: Mon Apr 16, 2012 3:13 pm

Re: Controlling Microcontroller
benji_19994
would this work for arduino ?
22 posts Page 2 of 3
Return to “Tutorials”