Welcome, Guest

Author Topic: Can't send a single byte out serial port - could use some help  (Read 1043 times)

bvdb

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Can't send a single byte out serial port - could use some help
« on: December 08, 2016, 10:37:54 PM »
Hi,

When I send a byte out the serial port it is always followed by a space.  I need to not send the space.  Is there a way?


1000 open "COM4:115200,1024) as #1
1010 print #1,8;
1020 print 8;
1030 for i= 1 to 5000: next i
1040 goto 1010

produces: 8 8 8 8 8 8 8   not 88888888


Regards,

Bert

Mr Hammond

  • Newbie
  • *
  • Posts: 6
  • Karma: +1/-0
Re: Can't send a single byte out serial port - could use some help
« Reply #1 on: December 09, 2016, 03:04:24 PM »
Hi,
Put quotes (") around the 8 and it will work
1020 PRINT "8";

8888888

JohnS

  • Hero Member
  • *****
  • Posts: 1665
  • Karma: +33/-45
Re: Can't send a single byte out serial port - could use some help
« Reply #2 on: December 09, 2016, 06:14:37 PM »
It may be that it's not followed but rather preceded by a space (or - sign if you used a negative number).

Convert to a string ans do as already posted.

John