Search found 3323 matches

by BasicCoder2
Aug 18, 2019 0:10
Forum: Hardware Interfaces / Communication
Topic: FreeBasic communication with Arduino logic error?
Replies: 50
Views: 16737

Re: FreeBasic communication with Arduino logic error?

Your image doesn't show up for me. I had to hold the right button down over the icon to get the image url and paste that into google in order to view the image. I use, https://postimages.org/ I will have to order some of those SN74HC595N IC's to give it a go. Are you going to post your code? Maybe s...
by BasicCoder2
Aug 17, 2019 23:49
Forum: Game Dev
Topic: Physics question
Replies: 74
Views: 21431

Re: Physics question

@badidea, I like it! Now maybe make it into some kind of game? Perhaps manoeuvring through an asteroid belt looking for natural resources or combat with opponents? With asteroids to give a sense of relative motion I would suggest if you can make the origin always be on the space ship? Maybe manoeuvr...
by BasicCoder2
Aug 17, 2019 21:17
Forum: Game Dev
Topic: Mouse trouble
Replies: 21
Views: 8399

Re: Mouse trouble

dodicat wrote:Try this.
1) Put the variables
dim as integer mousex,mousey,mousebutton,mouse
at the beginning of the sub so they are global to the goings on.
2) Just before leaving the sub, put
leftmousebuttonpressed=mousebutton
...
This replicates basiccoder2's code behaviour.


Well worked out dodicat :)
by BasicCoder2
Aug 17, 2019 9:56
Forum: Game Dev
Topic: Mouse trouble
Replies: 21
Views: 8399

Re: Mouse trouble

@ITomi, I did try to figure out where the code wasn't working as you expected but I am not very good at unravelling other people's code instead I find it easier to just write my own version based on the behaviors required. I have added code to the previous post to change the color of the scroll butt...
by BasicCoder2
Aug 17, 2019 7:47
Forum: Game Dev
Topic: Mouse trouble
Replies: 21
Views: 8399

Re: Mouse trouble

@dodicat, Missed that I was just too pleased to see it "working" to notice :) ITomi wants it to scroll only if the player releases the button above an arrow icon which is not how I see buttons usually behaving which is to act if the mouse button is pressed while over a GUI button. So I won...
by BasicCoder2
Aug 16, 2019 19:38
Forum: Game Dev
Topic: Mouse trouble
Replies: 21
Views: 8399

Re: Mouse trouble

It is quite hard for me to follow. But if you omit leftmousebuttonpressed=0 from the first bit it seems to be OK. It also seems to work if you make it two if/then blocks instead of using the elseif I also couldn't see the reason for using ubyte and ushort and changed them to integer but that had no...
by BasicCoder2
Aug 15, 2019 19:28
Forum: Hardware Interfaces / Communication
Topic: FreeBasic communication with Arduino logic error?
Replies: 50
Views: 16737

Re: FreeBasic communication with Arduino logic error?

How can I read the string on the Arduino side, bit by bit? A string is a list of characters. Read each character one at a time in a for loop. Are you using any online tutorial example? Test your Arduino code using the Serial Monitor. Type in your 18 long string in the edit box then click the Send b...
by BasicCoder2
Aug 15, 2019 9:51
Forum: Game Dev
Topic: Mouse trouble
Replies: 21
Views: 8399

Re: Mouse trouble

My problem is now with the FOR loop, because I don't understand why is it not execute the SELECT CASE in case of i=0 ? (See the code in my first post.) What happening with the SELECT CASE within the loop? Maybe it has something to do with other unseen parts of the code. Your code is too complicated...
by BasicCoder2
Aug 13, 2019 18:33
Forum: Projects
Topic: Articles on accessing RPi pins
Replies: 13
Views: 6372

pc to Rpi interfacing

speedfixer wrote:I use my desktop (PC) to talk to a headless PI that has a program that monitors an arduino.

Would you be interested in sharing any of that? Does the PC use FreeBASIC code?
by BasicCoder2
Aug 06, 2019 20:20
Forum: Hardware Interfaces / Communication
Topic: FreeBasic communication with Arduino logic error?
Replies: 50
Views: 16737

Re: FreeBasic communication with Arduino logic error?

Sadly I wasn't kidding. When you advised else where that I needed root rights and gave the example. su root That didn't work either until I realised you meant to use your name in place of the word root. su pi I do need to learn a bit more about Linux and its console commands. Anyway your effort and ...
by BasicCoder2
Aug 06, 2019 7:16
Forum: Projects
Topic: Serial.bi
Replies: 8
Views: 4329

Re: Serial.bi

It seems to be doing what mine did? Returns the previous input rather than the current input?
Image
by BasicCoder2
Aug 06, 2019 6:58
Forum: Hardware Interfaces / Communication
Topic: FreeBasic communication with Arduino logic error?
Replies: 50
Views: 16737

Re: FreeBasic communication with Arduino logic error?

fbc using_gpio.bas sudo ./using_gpio that's all All I get when I type in the above is "command not found". I can't even find the using_gpio.bas file !! may be learning a little bit linux isn't a bad idea ! Yes sure I will have to put more time aside for that. I had hoped it would be a lit...
by BasicCoder2
Aug 06, 2019 1:16
Forum: Hardware Interfaces / Communication
Topic: FreeBasic communication with Arduino logic error?
Replies: 50
Views: 16737

Re: FreeBasic communication with Arduino logic error?

You must run it as " root " ... as explained by Joshy (D.J.Peters). Sure but like I wrote I forgot how to do it. I did remember Joshy writing something about it and eventually found it. So I typed into a console window pi as the user and raspberry as the password. pi@raspberrypi : ~ $ su ...
by BasicCoder2
Aug 05, 2019 23:33
Forum: Hardware Interfaces / Communication
Topic: FreeBasic communication with Arduino logic error?
Replies: 50
Views: 16737

Re: Arduino Serial Communication Demo #1

I'll have to test on Linux next, but TERMINAL_EOL probably only needs to be CHR(10) on Linux. I ran your code on windows and got the same output as you did. On the Raspberry Pi it all compiled as expected but failed to run with, Permission denied. Forgot how to fix that. Of course I had to change t...
by BasicCoder2
Aug 05, 2019 21:29
Forum: Projects
Topic: Articles on accessing RPi pins
Replies: 13
Views: 6372

Re: Articles on accessing RPi pins

@Joshy,
Thank you for your responses.
I have printed them out for reference for when I get back to work on the projects.
It looks as if MrSwiss has some interesting code that I will try out later today.

Go to advanced search