Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 16:34 02 May 2024 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 : Remote coding MMBasic on an Android Tab

Author Message
tom_g
Newbie

Joined: 21/02/2023
Location: Switzerland
Posts: 14
Posted: 08:56pm 08 Apr 2024
Copy link to clipboard 
Print this post

Hi all,

I would like to share my experiences with remote coding MMBasic on a Android Tab.
And possibly to know about yours.

Situation: nightly late hours 21..23 are at my disposition, the remainders dedicated to work, wife and dogs ...
often I want to test some code, although tired and already laying on my bed, switch my tab on and ... code ! (I did this with my laptop, but felt unconfortable with size, weight, battery capacity and dissipation heat)

Conditions: no USB OTG connector plugged into the Tab, and coding a standard/clone Pico, not a Pico-W (*)

I did tests with two HC-12 433MHz to UART modems, firstly, one of them must be plugged in the OTG adapter, bulky, and worse, xmodem uploading was not successful, maybe a buffer overrun issue during the 115kBd stream ? So I headed for other ways:

First possibility: I have found a suitable offline editor app "Code editor" to comfortably build code, pity is missing MMBasic syntax highlighting. Best remote connection experience is with a HC-06/05 Bluetooth modem, connected to COM and console splitting (between both USB and COM)
With the app"Serial Bluetooth Terminal" the offline *.bas file can be uploaded using xmodem, this goes really fast !

Second possibility and my preferred way is online coding in the Pico, using the PicoMite integrated editor. For this I prefer using the Terminal app "Another Term" in serial mode, the Galaxy S6 Tab being connected via BT to HC-06 on the pico, the editor set to max. size (240x100), font size 15, good for my aged eyes. Coloured syntax and really fast, even to scroll through the pages.

(*)Became curious, I have tested a program upload using a Pico-W, talking Telnet, the app "Serial Wifi Terminal" by Xmodem. Works, but much slower upload speed than through BT (could be due to my Wifi infrastructure), and I have not found how to use "Another Term" talking Telnet although they claim it can.

So I will continue to use the BT version and have placed an order for several more HC-05

edit: often I have a need for a trending/logging debugging tool, much better than running table values. Except for the BT app "Bluetooth graphics" which works but is not flawless and incomplete I have not found another suitable, any hints ?

All apps referred herein are from Google Playstore.

My best regards to the community:
HB9TOM Thomas
Edited 2024-04-09 07:06 by tom_g
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3016
Posted: 11:54pm 08 Apr 2024
Copy link to clipboard 
Print this post

Nice. Thanks for sharing.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3550
Posted: 06:43am 09 Apr 2024
Copy link to clipboard 
Print this post

Hi Thomas,

Thank you for sharing. I love coding on a relatively good keyboard (not too small so my fingers can partially blind type) and have not had good experience with typing on glass. To many key misses.

But your experience may come in handy. I do have an HC-06 module, so I can run a test to get the system working. Just have to find a terminal program for "the other, non-android, tablet brand".

I wonder if I can find something that works on IpadOS-9. That would make the 12 year old Ipad usefull again. I do have anew one, but it hurts me to see the old one -fully functional, still good battery life- being useless because of software support that stopped. The only thing that still works on it is Google Maps App (Google on Ipad...hihi)

Volhout
PicomiteVGA PETSCII ROBOTS
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 303
Posted: 06:53am 09 Apr 2024
Copy link to clipboard 
Print this post

  Quote   often I have a need for a trending/logging debugging tool, much better than running table values. Except for the BT app "Bluetooth graphics" which works but is not flawless and incomplete I have not found another suitable, any hints ?


The Android world has it's equivalent of MMBasic. OliBasic, a derivative of RFO-Basic can do amazing things. Like MMBasic, it's an interpreter.

BT and WiFi comms are an absolute breeze. Support for USB-serial is a recent addition.
Rolling your own logging app should be quite straightforward.

Online manual
 
tom_g
Newbie

Joined: 21/02/2023
Location: Switzerland
Posts: 14
Posted: 07:20pm 09 Apr 2024
Copy link to clipboard 
Print this post

Good evening gents !

Tnx for your replies.

Good luck Volhout in your attempt to reanimate the old apple tab, I am like you in  sense of the wish to preserve the values of ancient things that are usually being disposed of. Even at work (I am an analog hardware electronic guy) - I use 3 resurrected old Samsung Notebooks, with exclusive use for some specific IDE, PicoMite, PIC, PSoC1 (a mixed signal configurable system with an 8bit M8C core, including 2k of RAM ... I learnt how to "bit stuff" par excellence with that wonderful unique chip - I still hold a stock of more than 100 pcs of them, a real fortune nowadays.

Tnx PhoenixRising for the link to OliBasic, seems powerful indeed. But I can't find it in the PlayStore ? Does this mean it is not supported on my Tab or Android version ? Do you have it in use, which version, APK link ?

Best

Thomas
Edited 2024-04-10 05:22 by tom_g
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 303
Posted: 08:42pm 09 Apr 2024
Copy link to clipboard 
Print this post

  tom_g said   But I can't find it in the PlayStore ? Does this mean it is not supported on my Tab or Android version ? Do you have it in use, which version, APK link ?
Thomas


Google keeps moving the darned goal-posts; apps must target a certain level of API and restrictions keep creeping-in such as not being able to create an app that can send text messages, etc.

There should be links to all the varieties in the online manual with an explanation of the various limitations. Some users want their apps to end-up on the Playstore and so they have to follow those rules. I just load my apps directly on the tablets and don't care about the Playstore so I use the latest OliBasic.

"aFox" is a member of this group and he is the Pete Mather of OliBasic. If he checks-in, he can probably provide more of the nitty-gritty details.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 303
Posted: 08:49pm 09 Apr 2024
Copy link to clipboard 
Print this post

I just noticed a new BASIC compiler on the playstore. Says it uses the FreeBasic compiler.

Basic Compiler for Android

Edit: First impression: Not great and it's non-graphical. Will test more tomorrow.
Edited 2024-04-10 07:03 by PhenixRising
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 303
Posted: 12:12pm 10 Apr 2024
Copy link to clipboard 
Print this post

@tom_g

Checked a couple of the other Android BASICs but OliBasic is king.

Question: I downloaded/installed Another Term but from what I can see, a bluetooth dongle is required? It doesn't support the device's internal BT?
 
tom_g
Newbie

Joined: 21/02/2023
Location: Switzerland
Posts: 14
Posted: 02:19pm 10 Apr 2024
Copy link to clipboard 
Print this post

@PhenixRising

thank you for consolidating OliBasic, I will install it.

Another Term:

no, it definitely can use the internal BT (Samsung Galaxy S6 in my case):
If I had to plug something into the USB connector of my Tab, it would have been a no go,

You have to setup the connection to UART.
I have overridden the settings "do not change" with 115200,8,n,1 but you can try to leave all on unchanged, maybe it works. Then save your connection setup. When you are due to connect, you'll find your waiting BT partners in a list exposing their MAC and device name. Click on the HC-06 or which ever you intend to pair. The connection is then established, so opens the terminal screen.

Hope you succeed ! I can further assist if needed.

Best:

Thomas
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 303
Posted: 03:54pm 10 Apr 2024
Copy link to clipboard 
Print this post

  tom_g said  @PhenixRising


You have to setup the connection to UART.
I have overridden the settings "do not change" with 115200,8,n,1


Oh wow...This is exactly what I did (guessing).

Wasn't able to test with another device but I'll plug my HC05 in again, in the next few days.

Gregor (aFox) is usually a bit ahead of the guys who handle the online and PDF manuals and I just found his latest version on the forum, together with the latest appendix to the original RFO-Basic manual. Both attached.


OliBasic3_00PreviewV30x_x.zip

OliBasic 3_00 Appendix 2024-02-04.zip
 
tom_g
Newbie

Joined: 21/02/2023
Location: Switzerland
Posts: 14
Posted: 08:33pm 10 Apr 2024
Copy link to clipboard 
Print this post

Good evening PhenixRising,

oh man, Oli Basic seems to be very powerful indeed, installed the APK, Reference and manual. Now must getting familiar with the dialect.

On RFOs WebWiki I have found these sentences, pointing towards solving the knot for BT linking ...

"Before communication can occur, Bluetooth must be enabled on two devices and the devices have to be paired — that is, made aware of one another. Typically, one of the devices provides a passcode that the user of the other device enters through the keyboard. The way to do this is usually in the Android settings. That is, you must pair your Android device with its Bluetooth partner outside RFO-BASIC! before the BASIC program can open a connection to the partner."


As I used the same unique HC-06 long time ago for another task, I have then done the pairing and now it simply worked because the HC's MAC remains stored in Android and as such is immediately available in Another Term.

Best

Thomas
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 303
Posted: 09:42pm 10 Apr 2024
Copy link to clipboard 
Print this post

Some cool utilities, etc.

I prefer to edit in NP++ and have set-up a server. I edit the code on the PC and it saves directly to the device.

Thankfully, it's not an event driven language (detest them) and so, despite the fact that it's an interpreter, my UIs feel much more responsive than when I used the B4A (anywheresoftware.com) compiler.

Friends regard me as a programming wizard (absolutely not) because I can throw Android apps together in a heartbeat  
 
Print this page


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

© JAQ Software 2024