Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

News

Welcome to Yet Another Programming Community!

 
Pages: [1]   Go Down Print
Author Topic: Sending a single byte in VisualBasic 6.0?  (Read 339 times)
ReCreate
Full Member
***

Karma: +2/-24
Offline Offline

Posts: 161


GML/PHP/C++/VB6/Turing Programmer

recretae123@gmail.com
View Profile WWW
« on: September 24, 2009, 10:15:14 PM »

So i am using:
Code:
MSComm1.Output = "Whatever"
to send things over the serial port, but i don't know how to send a single byte.
I looked around in places, google'd it, found nothing...
Any ideas?
Thanks
~ReCreate
Logged

xot
Administrator
Jr. Member
*****

Karma: +0/-0
Offline Offline

Posts: 54



View Profile WWW
« Reply #1 on: September 25, 2009, 11:29:37 AM »

I'm not a VB programmer, but I think its as simple as:
Code:
MSComm1.Output = Chr(240)
240 being the decimal value of the byte (0xF0).
Logged


ReCreate
Full Member
***

Karma: +2/-24
Offline Offline

Posts: 161


GML/PHP/C++/VB6/Turing Programmer

recretae123@gmail.com
View Profile WWW
« Reply #2 on: September 25, 2009, 01:52:30 PM »

Oh, Ok Thanks!
~ReCreate
Logged

Schyler
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 2


Experienced Mentor


View Profile WWW
« Reply #3 on: October 25, 2009, 01:57:52 AM »

Dosn't raw values work also? I remember them working in other .NET languages, particularly C#.

MSComm1.Output = 0xF0

Regards,
-Schyler-
Logged
Pages: [1]   Go Up Print
 
Jump to:  

 
     
Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
Theme by Roach
Valid XHTML 1.0! Valid CSS!