Search found 378 matches

by stevedee
Tuesday 16th February 2021 9:44am
Forum: Lounge
Topic: Anyone had a Covid jab?
Replies: 9
Views: 259

Re: Anyone had a Covid jab?

...At first, the suits said it was voluntary. ... ...I predict in the U.S. there will come a day (probably later this year) when it will be impossible to get a job or travel... Its a real dilemma, and one I'm glad I don't have to make a ruling on. On the one hand, I respect the rights of people to ...
by stevedee
Monday 15th February 2021 5:14pm
Forum: General
Topic: Hexadecimal to Decimal
Replies: 4
Views: 110

Re: Hexadecimal to Decimal

Yes, I think its a casting problem. Adding a trailing "&" seems to sort it out:-
&hffff&
by stevedee
Monday 15th February 2021 5:03pm
Forum: General
Topic: Hexadecimal to Decimal
Replies: 4
Views: 110

Re: Hexadecimal to Decimal

cogier wrote:
Monday 15th February 2021 4:52pm
Print &HFFF Returns 4095
Print &HFFFF Returns -1 not 65535
Print &HFFFFF Returns 1048575

Am I missing something here?
Try:-
Print &H00FFFF (Returns 65535)
by stevedee
Monday 15th February 2021 3:56pm
Forum: General
Topic: [Solved] Sending Data to the Serial Port
Replies: 11
Views: 282

Re: Sending Data to the Serial Port

Sorry Andy, I'm an idiot. Send is a method. Also you may need to use the Begin method, so try:- Public Sub Form_Open() With SerialPort1 .PortName = "/dev/ttyS0" 'needs to be appropriate for your computer .Speed = 1200 'must match printer .FlowControl = SerialPort.Hardware 'must match printer .DataBi...
by stevedee
Monday 15th February 2021 3:19pm
Forum: Beginners
Topic: Creating objects
Replies: 8
Views: 253

Re: Creating objects

...In version 1 oApple can be accesses from any other function because it's scope is a global variable... Is it "global" Bruce? I'd have to double check this, but I think its only Public to the class that it is declared within. So not directly accessible from (say) other forms, except via dot notat...
by stevedee
Monday 15th February 2021 3:12pm
Forum: Beginners
Topic: Creating objects
Replies: 8
Views: 253

Re: Creating objects

Hi Seb, welcome to GambasONE. I've just notice that PJ has replied since I started composing this answer, so there may be some duplication. Version 1 & 2 are a bit pointless because you are creating an instance of the object as soon as the programs starts, so you may as well just Declare and create ...
by stevedee
Sunday 14th February 2021 1:48pm
Forum: General
Topic: [Solved] Sending Data to the Serial Port
Replies: 11
Views: 282

Re: Sending Data to the Serial Port

...once you have proved that your computer can communicate with your display using a program like minicom , you could try a bit of Gambas like this:- Public Sub Form_Open() With SerialPort1 .PortName = "/dev/ttyS0" 'needs to be appropriate for your computer .Speed = 1200 'must match printer .FlowCon...
by stevedee
Sunday 14th February 2021 1:10pm
Forum: General
Topic: [Solved] Sending Data to the Serial Port
Replies: 11
Views: 282

Re: Sending Data to the Serial Port

Sounds like an interesting challenge Andy. If you haven't already done so, I'd suggest doing a test first to establish that all is OK with your hardware. Are you connecting an RS232 port from a computer to your mini-LCD display? You will need protocol information for your display (e.g. how to set ba...
by stevedee
Sunday 14th February 2021 8:10am
Forum: Component
Topic: Gambas --> Beaglebone Black
Replies: 10
Views: 6212

Re: Gambas --> Beaglebone Black

It took a few years... but I finally hit the point where I'm able to control GPIO from GAMBAS on the Raspberry Pi... Its been on the back-burner for quite a while, but I guess your Pi is now cooked. Glad to see you also have the electronics side of things well covered. I wasn't trying "... to teach...
by stevedee
Saturday 13th February 2021 6:31pm
Forum: Beginners
Topic: Form X. is redefined incorrect in Class FMain
Replies: 12
Views: 295

Re: Form X. is redefined incorrect in Class FMain

fox73 wrote:
Saturday 13th February 2021 4:55pm
...omitting the declaration of "x" resolves the problem. So I assume that "x" is a
reserved word in GamBas - is that right?
The error says "Form.X" which would be the X property of a form called Form...which doesn't make sense.

Maybe just copy and paste the section of code that mentions Form.X.