User Profile

Collapse

Profile Sidebar

Collapse
SciCat
SciCat
Last Activity: Mar 3 '13, 03:42 PM
Joined: Feb 25 '13
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I have managed to solve the conversion problem using Bitshift in the byte itself using an integer:

    Code:
    Public Class Form1
        Public com3 As New SerialPort("COM3", 9600, Parity.None, 8, StopBits.One)
    
        Public Sub SendCMD(Adress As Byte, Command As Byte, Type As Byte, Motor As Byte, Value As Integer)
            Dim TxBuffer() As Byte
            Dim i As Integer
    
            TxBuffer = {Adress,
    ...
    See more | Go to post
    Last edited by SciCat; Mar 2 '13, 05:22 PM. Reason: changed the for i = 0 to 8 to 7, Idiocy on my part

    Leave a comment:


  • Convert number to hex in byte array (&H?? format)

    Hello!

    I'm running Visual Basic 2012

    I'm having a certain amount of sucess controlling my serial port but now I've hit a wall.

    Code:
     Public com3 As New SerialPort("COM3", 9600, Parity.None, 8, StopBits.One)
    
        Public Hexe As Integer = Hex(100)
    
          Public Sub New()
            InitializeComponent()
            For Each sp As String In My.Computer.Ports.SerialPortNames
    ...
    See more | Go to post
    Last edited by SciCat; Feb 25 '13, 03:23 PM. Reason: Should mention that the code isn't complete. Added version info.
No activity results to display
Show More
Working...