FreeBASIC and the Raspberry Pi ?

For other topics related to the FreeBASIC project or its community.
D.J.Peters
Posts: 8208
Joined: May 28, 2005 3:28
Contact:

Re: FreeBASIC and the Raspberry Pi ?

Postby D.J.Peters » Mar 25, 2018 12:24

! -s gui Is Windows only !

Joshy
srvaldez
Posts: 2640
Joined: Sep 25, 2005 21:54

Re: FreeBASIC and the Raspberry Pi ?

Postby srvaldez » Mar 25, 2018 15:29

BasicCoder2 wrote:Image

if you want F5 to compile and run your source code then you could change the Execute command from
"./%e" to
fbc -w all "%f" && "./%e"
but then if you decided to add compiler flags then you would also need to change the compile command in the Execute command, besides, I don't see an advantage in having F5 compile and execute your program.
warning: in case of error the error is displayed in the terminal and not in the compiler warning/error pane
BasicCoder2
Posts: 3672
Joined: Jan 01, 2009 7:03
Location: Australia

Re: FreeBASIC and the Raspberry Pi ?

Postby BasicCoder2 » Mar 26, 2018 19:08

Just tried dodicat's second graphics example in the thread
viewtopic.php?f=7&t=26526
and it turned very slowly in little jerks whereas on my laptop it rotated smoothly and a reasonable rate.
So clearly the Raspberry Pi isn't any replacement for a i5 laptop when it comes to graphics.
St_W
Posts: 1514
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBASIC and the Raspberry Pi ?

Postby St_W » Mar 26, 2018 19:53

BasicCoder2 wrote:So clearly the Raspberry Pi isn't any replacement for a i5 laptop when it comes to graphics.

The RPi isn't a replacement for a i5 in any regard :-) ... but that is not the aim of the RPi anyway.
BasicCoder2
Posts: 3672
Joined: Jan 01, 2009 7:03
Location: Australia

Re: FreeBASIC and the Raspberry Pi ?

Postby BasicCoder2 » Mar 27, 2018 11:10

St_W wrote:
BasicCoder2 wrote:So clearly the Raspberry Pi isn't any replacement for a i5 laptop when it comes to graphics.

The RPi isn't a replacement for a i5 in any regard :-) ... but that is not the aim of the RPi anyway.

I don't know if any of the slow graphics is due to the GPU or the CPU.
I was going to use the RPi to replace the Arduino controlling my robot with the idea of being able to do all the code in the one language, FreeBASIC.
In reality a small laptop probably gives you the most bang for the buck in terms of computing power, software tools and hardware and thus a laptop plus Arduino for low level processing is probably the best option.
dasyar
Posts: 369
Joined: Dec 04, 2008 15:31

Re: FreeBASIC and the Raspberry Pi ?

Postby dasyar » Mar 29, 2018 12:09

I was going to use the RPi to replace the Arduino controlling my robot with the idea of being able to do all the code in the one language, FreeBASIC.

As you have found out, there is a very limited amount of people that are using freeBasic with the Raspberry Pi. The main push for the RPi is Python, and in some cases C, so you will not find any fbc code or examples for how to address the GPIO.

I have done some robot experiments where I have used the RPi and a microprocessor, my choice is the Parallax Activity Board. I still think it is a better match to use a microprocessor for the operation of the robot and use the RPi for the actual control and related functions.

One of my goals with the RPi, in use with the robot, was to use the built in WiFi for a headless RPi. Possibly an attached camera with the RPi for remote viewing of the robots line of sight. And of course the multitasking power of the RPi.

I have come to the conclusion that there is no one language that would be a "does it all", you probably have to mix and match too the functionality that is necessary to achieve.
BasicCoder2
Posts: 3672
Joined: Jan 01, 2009 7:03
Location: Australia

Re: FreeBASIC and the Raspberry Pi ?

Postby BasicCoder2 » Mar 29, 2018 13:48

dasyar wrote:I have come to the conclusion that there is no one language that would be a "does it all", you probably have to mix and match too the functionality that is necessary to achieve.

Sure but the main program could be written in FreeBASIC (or Python) running on a PC and the hardware i/o carried out by an Arduino.

The idea was to replace the k8055 board I was using with an Arduino. Thus the main computer, a PC programmed in FreeBASIC, would communicate with a programmed Arduino and its associated i/o circuitry to perform particular i/o tasks with the actual hardware. Whereas I am stuck with the fixed commands provided by the k8055 board and its associated circuitry with an Arduino I could program my own commands and wire up my own circuitry.
Last edited by BasicCoder2 on Apr 03, 2018 6:17, edited 1 time in total.
dasyar
Posts: 369
Joined: Dec 04, 2008 15:31

Re: FreeBASIC and the Raspberry Pi ?

Postby dasyar » Mar 29, 2018 14:41

@BasicCoder2
WOW, I am impressed, you are way more ambitious than I am.

In your cart configuration, it seems that you could replace the lap top with an RPi, and run it headless. Also, did you ever think about adding an IR component, so you could use a TV remote control to conviently move your cart around?

Do you have a side view shot of your round configuration, that also looks interesting.
BasicCoder2
Posts: 3672
Joined: Jan 01, 2009 7:03
Location: Australia

Re: FreeBASIC and the Raspberry Pi ?

Postby BasicCoder2 » Mar 30, 2018 7:57

dasyar wrote:In your cart configuration, it seems that you could replace the lap top with an RPi, and run it headless. Also, did you ever think about adding an IR component, so you could use a TV remote control to conveniently move your cart around?

The wireless keyboard gives remote control as well as a means to send commands or program the PC.
Do you have a side view shot of your round configuration, that also looks interesting.

That was put together to test Arduino code with regards to reading the encoders, reading other sensors and controlling the motors.
It was a gutted sweeper robot base. I used its motors, battery and battery charging circuit. I also used some of its sensors (not shown).
That was a year ago and it has since been replaced with another base.
Pitto
Posts: 119
Joined: Nov 19, 2012 19:58

Re: FreeBASIC and the Raspberry Pi ?

Postby Pitto » May 04, 2018 18:44

Hi all,

I've tanken some shots of my Raspberry PI 3 (Raspian OS) running Freebasic code:
https://youtu.be/e9kTKmUbG-A

Using this hardware I've compiled many code without problems.

It is working reasonably well. And it's fun :)

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 11 guests