Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 00:35 11 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Raspberry Pi

     Page 2 of 2    
Author Message
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2534
Posted: 04:17pm 29 Jan 2025
Copy link to clipboard 
Print this post

there's freebasic for raspberry pi and wiring pi plug in
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7857
Posted: 04:18pm 29 Jan 2025
Copy link to clipboard 
Print this post

That looks interesting, bfwolf. I wonder if the RPi version could be made to talk to one or more PicoMites to get some decent GPIO?
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
aFox
Senior Member

Joined: 28/02/2023
Location: Germany
Posts: 103
Posted: 08:40pm 29 Jan 2025
Copy link to clipboard 
Print this post

Hi

There is also a challenge with different GPIO drivers on the Raspberry 4 and the Raspberry 5.

Sometimes you get less headache, if you use a micro controller like the Pico and serial communication maybe via USB.

Yon can also use an Android OS provided by KonstaKang.com.
It supports some sensors like the BME280 directly.

Pro:
You can use a BASIC interpreter.
BASIC on Android

Con:
You have to create your own instrumets, but it should not be a problem if you use a SVG or a bitmap file as a background.

Gregor
Edited 2025-01-30 06:53 by aFox
 
bfwolf
Regular Member

Joined: 03/01/2025
Location: Germany
Posts: 75
Posted: 10:11pm 29 Jan 2025
Copy link to clipboard 
Print this post

  Mixtel90 said  That looks interesting, bfwolf. I wonder if the RPi version could be made to talk to one or more PicoMites to get some decent GPIO?


Just started the ComVisu application to explore some settings possibilities:
- Looks like you can use several COM (RS232) ports and TCP/IP and UDP ports simultaneously..

And I had an idea this afternoon after I made my post here:
- Why not let MMB4L communicate with ComVisu via a TCP/IP connection on the same Raspberry Pi  ("localhost")and use ComVisu for the GUI?  

- And of course you may read/control the Pi's GPIOs with MMB4L

- Additionally you could talk to several micro's (e.g. Picomites and their GPIOs) via n+1 serial ports..

The ComVisu software is - as far as I know - written with FreePascal and Lazarus - but "closed source"..

bfwolf
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3358
Posted: 10:33pm 29 Jan 2025
Copy link to clipboard 
Print this post

  bfwolf said  And of course you may read/control the Pi's GPIOs with MMB4L


MMB4L pin I/O is limited to system calls to the deprecated sysfs or the new, but limited, libgpiod helper programs. ON/OFF is probably about the best you can do.

  Quote  Additionally you could talk to several micro's (e.g. Picomites and their GPIOs) via n+1 serial ports


This may be a good option, depending on your need for speed.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
aFox
Senior Member

Joined: 28/02/2023
Location: Germany
Posts: 103
Posted: 11:22am 30 Jan 2025
Copy link to clipboard 
Print this post

  bfwolf said  
  Mixtel90 said  That looks interesting, bfwolf. I wonder if the RPi version could be made to talk to one or more PicoMites to get some decent GPIO?


Just started the ComVisu application to explore some settings possibilities:
- Looks like you can use several COM (RS232) ports and TCP/IP and UDP ports simultaneously..

And I had an idea this afternoon after I made my post here:
- Why not let MMB4L communicate with ComVisu via a TCP/IP connection on the same Raspberry Pi  ("localhost")and use ComVisu for the GUI?  

- And of course you may read/control the Pi's GPIOs with MMB4L

- Additionally you could talk to several micro's (e.g. Picomites and their GPIOs) via n+1 serial ports..

The ComVisu software is - as far as I know - written with FreePascal and Lazarus - but "closed source"..

bfwolf


I am missing a Bluetooth interface.

Gregor
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7857
Posted: 11:43am 30 Jan 2025
Copy link to clipboard 
Print this post

Use a UART to Bluetooth module like the HC=05.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
aFox
Senior Member

Joined: 28/02/2023
Location: Germany
Posts: 103
Posted: 11:49am 30 Jan 2025
Copy link to clipboard 
Print this post

Nowadays a Pico W would be a better solution, because the integrated USB port.

Gregor
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7857
Posted: 12:33pm 30 Jan 2025
Copy link to clipboard 
Print this post

It would if its Bluetooth was supported. The HC-05 "just works".
So far I personally have had little luck with the Pico W. Mind you, I haven't tried for a while. I gave up using it for the application I had in mind as it was way too flaky.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5054
Posted: 12:44pm 30 Jan 2025
Copy link to clipboard 
Print this post

MMB4L works very reliable with USB serial ports.

A picomite could be used as an IO device for MMB4L.
There is a varietey of protocols that can be used invented for that, depending how complex the IO must be, you can even use the MODBUS protocol, or SCPI, or ..... Then you need to write the PicoMite client software as well.

In simple projects I have used a bare picomite, and gave it commandline commands from MMB4L. Things like "SETPIN GP0,DOUT : PIN(GP0)=1"
No program inside the PicoMite, just the firmware.

When using commandline you can also AUTOSAVE a client program from MMB4L into the PicoMite, then RUN it, so you never need more that a bare picomite attached through USB. I have done this for time critical applications (reading many ADC samples fast).

The possibilities are endless...

Volhout
Edited 2025-01-30 22:46 by Volhout
PicomiteVGA PETSCII ROBOTS
 
bfwolf
Regular Member

Joined: 03/01/2025
Location: Germany
Posts: 75
Posted: 09:56am 31 Jan 2025
Copy link to clipboard 
Print this post

@thwill:
https://www.thebackshed.com/forum/ViewTopic.php?TID=17658&P=1#233294

Hi Tom,
I think you are the right person when it comes to Linux or MMB4L knowledge?:

Is it very difficult to operate TCP or UDP connections from MMB4L?

If that were straightforward, ComVisu would be an elegant "GUI" for displaying measured values ​​or querying inputs or controlling outputs.

The TCP or UDP connections could be "localhost" and thus the measured value processing and control of outputs via MMB4L and the visual representation with ComVisu could take place on the same machine (e.g. Raspberry Pi).

bfwolf
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4301
Posted: 10:31am 31 Jan 2025
Copy link to clipboard 
Print this post

  bfwolf said  Hi Tom,


Hi @bfwolf.

  bfwolf said  I think you are the right person when it comes to Linux or MMB4L knowledge?:


I'm certainly the person who knows about MMB4L but when it comes to Linux (or TCP/UDP) knowledge I'm very far from being a guru ... I'm not sure we have one, at least not amongst those of us on TBS who make much noise.

  bfwolf said  Is it very difficult to operate TCP or UDP connections from MMB4L?


Currently (and for the foreseeable future) MMB4L has no inbuilt networking, you'd need to use the SYSTEM command to call out to the standard `curl` utility and parse its response. Likewise if you want to control GPIO, but probably then by using `sysfs`. In effect you'd just be using MMBasic/MMB4L as a scripting language to glue together command line utilities.

It could "probably" be done, it would probably be "fun" to do, but I wonder whether it makes much sense as an approach . You would probably be better off using Python if you want to do this all on a Raspberry Pi.

Best wishes,

Tom
Edited 2025-01-31 21:30 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
aFox
Senior Member

Joined: 28/02/2023
Location: Germany
Posts: 103
Posted: 12:34pm 31 Jan 2025
Copy link to clipboard 
Print this post

Hi Mick

  Mixtel90 said  It would if its Bluetooth was supported. The HC-05 "just works".
So far I personally have had little luck with the Pico W. Mind you, I haven't tried for a while. I gave up using it for the application I had in mind as it was way too flaky.


In conjunction with a Raspberry PI I agree with you.
In case of my mobile PC not, because I have to use an extra USB-Serial adapter.

Maybe try Pico W as Bluetooth Adapter

I have good results up to 20 m distance.

Gregor
 
bfwolf
Regular Member

Joined: 03/01/2025
Location: Germany
Posts: 75
Posted: 12:59pm 31 Jan 2025
Copy link to clipboard 
Print this post

Hi Tom, @thwill,

I did some quick research and found some interesting pages..  

From my 1st contacts with UN*X at university lessons (long long ago), I remember a sentence: "In UN*X, everything is a file!"

I hoped, this also meets TCP and the corresponding stuff, bit it's "little bit more complicated" in this case..

It's not that easy, that TCP/UDP connections could generally treated as files with the "standard file functions", but there are "similar" functions and the socket descriptors are in fact just "file descriptors"..

I found 2 larger documents about this:
https://www.dcs.gla.ac.uk/~johnson/teaching/CS-1Q/slides/lecture4/net.pdf
https://www.scs.stanford.edu/07wi-cs244b/refs/net2.pdf

Using this informations would lead to a solution like treating "special paths" as sockets and implement the MMB4L "OPEN" command to open a socket instead a file and the I/O commands/functions PRINT #d, INPUT$(n, #d) to read/write to the sockets.
The "CLOSE #d" would even remain unchanged!

But I even found some other 2 interesting pages:

"HTTP requests via /dev/tcp" (only with bash?)
http://rednafi.com/misc/http_requests_via_dev_tcp/

"command line tool and library for transferring data with URLs (since 1998)"
https://curl.se/
Usage as "command line tool" leads to the "SYSTEM" MMB4L command?

bfwolf
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4301
Posted: 01:21pm 31 Jan 2025
Copy link to clipboard 
Print this post

Hi @bfwolf,

Tenacious aren't you .

  bfwolf said  ... In UN*X, everything is a file!
... TCP/UDP connections could generally treated as files with the "standard file functions", but there are "similar" functions and the socket descriptors are in fact just "file descriptors"
... Using this informations would lead to a solution like treating "special paths" as sockets and implement the MMB4L "OPEN" command to open a socket instead of a file
...


Yes, as far as I understand that would be the correct approach and some of this functionality might already exist in Peter's defunct PiCroMite project. However *I* am not going to implement it in the foreseeable future (though MMB4L is on GitHub and open to contributions) because I just don't have the time.

  bfwolf said  "HTTP requests via /dev/tcp" (only with bash?)
http://rednafi.com/misc/http_requests_via_dev_tcp/


I'm not sure that approach is directly translatable to the MMBasic SYSTEM command unless you are simply going to use that bash script (or something similar) and invoke it using SYSTEM.

  bfwolf said  "command line tool and library for transferring data with URLs (since 1998)" https://curl.se/ Usage as "command line tool" leads to the "SYSTEM" MMB4L command?


That is the approach I was suggesting (in the absence of Python or Node.js or something else that isn't just a hobby project.) I suspect its applicability depends on what data you need to send and receive and how fast you need to do it as every request involves the relatively expensive cost of writing input to a file, launching curl as a separate process and parsing back the output.

Best wishes,

Tom
Edited 2025-01-31 23:42 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1360
Posted: 01:31pm 31 Jan 2025
Copy link to clipboard 
Print this post

  bfwolf said  Maybe interesting for others?
Not a project of mine, but know it since several years..

http://www.comvisu.de/descreenshots.htm

Sample screenshot:



GUI language may be switched from German to English but manual only available in German language!

Available for Windows, Linux and Raspberry Linux..
Communication with microcontroller boards possible via RS232 or TCP/IP..

bfwolf


I use Knob Studio to create my own GUIs.

Too many GUIs just look the same-ish/20th century, IMO.

Sample of my knobs and gauges:














 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025