Search found 69 matches

by vuott
Saturday 20th February 2021 3:39pm
Forum: General
Topic: [Solved] Help with sending Hex to serial port
Replies: 9
Views: 563

Re: Help with sending Hex to serial port

maybe like so ... ...... Dim strOutput As String = Chr(&H1B) & Chr(&H3D) & OutputMode Dim strDisplay As String = Chr(&H1F) & DisplayMode Dim strInit As String = Chr(&H1B) & Chr(&H40) ........ Write #sptCom1, strOutput & strDisplay & strInit Yes, perfect, if he prefers to use ASCII characters (as th...
by vuott
Saturday 20th February 2021 3:28pm
Forum: General
Topic: [Solved] Help with sending Hex to serial port
Replies: 9
Views: 563

Re: Help with sending Hex to serial port

but you said this was only a byte so do I send the command "1F 0D" ...obviously the problem is whether you have to send one byte at a time, or whether those two bytes represent a 16-bit value (in Gambas it is a "Short" data type). In the first case you will have to repeat the " Write ... As Byte " ...
by vuott
Saturday 20th February 2021 2:42pm
Forum: General
Topic: [Solved] Help with sending Hex to serial port
Replies: 9
Views: 563

Re: Help with sending Hex to serial port

AndyGable wrote:
Saturday 20th February 2021 2:30pm
Would that work for the following Commands
......
Thanks for the advice so far on this project
Sorry, I didn't understand if you solved it.
by vuott
Saturday 20th February 2021 12:28am
Forum: General
Topic: [Solved] Help with sending Hex to serial port
Replies: 9
Views: 563

Re: Help with sending Hex to serial port

AndyGable wrote:
Friday 19th February 2021 3:33pm
I am hoping to send to the screen the Clear command (this is HEX 0C) how would I sent this to the screen?

So my question is how do I send the Hex command to the screen?
Since the hex value "0C" is and occupies one byte, you must specify it:
Write #SerialPort1, &h0C As Byte
by vuott
Wednesday 03rd February 2021 2:24am
Forum: General
Topic: how to get sub/function name and parameters
Replies: 8
Views: 939

Re: how to get sub/function name and parameters

Vuotts method looked pretty simple :) ...but more complexly and for more generic elements, by accessing the " CLASS_EVENT *event " member of " _CLASS " Structure (in the header file " gbx_class.h "): Public Sub Main() Dim p As Pointer p = Object.Address(Me) Functio(p) End Private Function Functio(p...
by vuott
Sunday 31st January 2021 5:32pm
Forum: General
Topic: how to get sub/function name and parameters
Replies: 8
Views: 939

Re: how to get sub/function name and parameters

The function "name" can be obtained with....

Exemplum simplex:
Public Sub Main()

  Dim s As String

  For Each s In Class.Load("Main").Symbols
    Print s
  Next

End


Public Function test(par1 As Integer, par2 As String) As Integer
    
End
by vuott
Friday 15th January 2021 3:37pm
Forum: General
Topic: The new Gambas AppImage - can it run on Android?
Replies: 5
Views: 815

Re: The new Gambas AppImage - can it run on Android?

cogier wrote:
Monday 11th January 2021 4:29pm
The answer I saw in 2015 was:
https://lists.gambas-basic.org/pipermai ... 53346.html
by vuott
Thursday 14th January 2021 11:57pm
Forum: General
Topic: Draw in a picturebox
Replies: 8
Views: 939

Re: Draw in a picturebox

However, I would use a "DrawingArea": Private myPlayer As New MediaPlayer As "Player" '============================================================================= Public Sub Form_Open() '--- Opens a mediaplayer window with live video stream --- myPlayer.URL = "v4l2:///dev/video0" myPlayer.Play() F...
by vuott
Thursday 14th January 2021 11:27pm
Forum: General
Topic: Draw in a picturebox
Replies: 8
Views: 939

Re: Draw in a picturebox

In the "Public Sub Form_Open ()" routine also set this command line:
ThePictureBox.Background = Color.Transparent