![]() |
Forum Index : Microcontroller and PC projects : Raspberry Pi
![]() ![]() |
|||||
Author | Message | ||||
stanleyella![]() Guru ![]() Joined: 25/06/2022 Location: United KingdomPosts: 2534 |
there's freebasic for raspberry pi and wiring pi plug in |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7857 |
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: GermanyPosts: 103 |
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: GermanyPosts: 75 |
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 StatesPosts: 3358 |
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. 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: GermanyPosts: 103 |
I am missing a Bluetooth interface. Gregor |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7857 |
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: GermanyPosts: 103 |
Nowadays a Pico W would be a better solution, because the integrated USB port. Gregor |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7857 |
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: NetherlandsPosts: 5054 |
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: GermanyPosts: 75 |
@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 KingdomPosts: 4301 |
Hi @bfwolf. 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. 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 ![]() 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: GermanyPosts: 103 |
Hi Mick 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: GermanyPosts: 75 |
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 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 KingdomPosts: 4301 |
Hi @bfwolf, Tenacious aren't you ![]() ... 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. 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. ![]() 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 KingdomPosts: 1360 |
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: ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |