Search found 3310 matches

by BasicCoder2
Aug 19, 2019 1:02
Forum: Game Dev
Topic: Physics question
Replies: 60
Views: 1767

Re: Physics question

@dodicat, My attempts just result in the coffin spinning out of control! Can you get it on target? So I cheated!! changed line 258 to make finer adjustments to the direction, Dim As pt x2=Getline(mx,my,wheel/90,length) And inserted these guidelines in the display code, circle (200,400),5,rgb(255,0,0...
by BasicCoder2
Aug 19, 2019 0:56
Forum: Game Dev
Topic: Physics question
Replies: 60
Views: 1767

Re: Physics question

Now maybe make it into some kind of game? That is the plan, that is also why this 'physics question' is in the 'Game Dev' section :-) I must say I find controlling the ship frustratingly impossible! Of course fun retro computer games usually don't use real physics. These 2d games can always be give...
by BasicCoder2
Aug 18, 2019 0:10
Forum: Hardware Interfaces / Communication
Topic: FreeBasic communication with Arduino logic error?
Replies: 50
Views: 1839

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: 60
Views: 1767

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: 544

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: 544

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: 544

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: 544

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: 1839

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: 544

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: 582

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: 1839

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: 397

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: 1839

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: 1839

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 ...

Go to advanced search