Search found 69 matches
- Saturday 20th February 2021 3:39pm
- Forum: General
- Topic: [Solved] Help with sending Hex to serial port
- Replies: 9
- Views: 564
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...
- Saturday 20th February 2021 3:28pm
- Forum: General
- Topic: [Solved] Help with sending Hex to serial port
- Replies: 9
- Views: 564
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 " ...
- Saturday 20th February 2021 2:42pm
- Forum: General
- Topic: [Solved] Help with sending Hex to serial port
- Replies: 9
- Views: 564
- Saturday 20th February 2021 12:28am
- Forum: General
- Topic: [Solved] Help with sending Hex to serial port
- Replies: 9
- Views: 564
Re: Help with sending Hex to serial port
Since the hex value "0C" is and occupies one byte, you must specify it:
Write #SerialPort1, &h0C As Byte
- 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...
- 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:
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
- Sunday 24th January 2021 10:45pm
- Forum: General
- Topic: gb.compress
- Replies: 2
- Views: 361
- Friday 15th January 2021 3:37pm
- Forum: General
- Topic: The new Gambas AppImage - can it run on Android?
- Replies: 5
- Views: 815
- Thursday 14th January 2021 11:57pm
- Forum: General
- Topic: Draw in a picturebox
- Replies: 8
- Views: 940
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...
- Thursday 14th January 2021 11:27pm
- Forum: General
- Topic: Draw in a picturebox
- Replies: 8
- Views: 940
Re: Draw in a picturebox
In the "Public Sub Form_Open ()" routine also set this command line:
ThePictureBox.Background = Color.Transparent