Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:01 12 May 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 : [AVR] BASIC interpreter for Arduino board

Author Message
psergiu

Regular Member

Joined: 09/02/2013
Location: United States
Posts: 83
Posted: 04:56am 07 Aug 2014
Copy link to clipboard 
Print this post

Hi,

I just got myself a cheap dswy_robot (Arduino Pro Mini clone) and i was asking myself if i can turn-it into a MicroMite-like device, running a BASIC interpreter on it.

I found Tiny Basic Plus.

It's an integer-only, quite limited BASIC, but it works.

Does anyone knows other alternatives ?

Thanks.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3998
Posted: 05:16am 07 Aug 2014
Copy link to clipboard 
Print this post

Maybe some of these are of use:

www.compilers.net/Dir/Free/Compilers/Basic.htm
www.dmoz.org/Computers/Programming/Languages/BASIC/
www.cbel.com/basic_programming_language/
http://forum.basicprogramming.org/index.php
www.nicholson.com/rhn/basic/basic.info.html
www.thefreecountry.com/compilers/basic.shtml
www.freeprogrammingresources.com/basic.html

gambas.sourceforge.net
http://jumentum.sourceforge.net/
https://projects.drogon.net/return-to-basic/
http://sourceforge.net/projects/lbpp/
http://wxbasic.sourceforge.net/
http://sourceforge.net/projects/xbasic/
http://yabasic.basicprogramming.org/
http://gcbasic.sourceforge.net/index.html

John
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 07:06am 07 Aug 2014
Copy link to clipboard 
Print this post

Hi pserglu, it would be cool if there was a basic available for the arduino boards that could also make use of all the libraries available out there for arduino. If this was possible, that would open a very cool can of worms, but without that, it's just another micro that can be programmed in basic. You would have to develop all the routines and manually deal with all the unsupported I/O just like we do now. The fact that the uMite has some hardware interfaces programmed in already make this thing great. Using LCD, keyboard, ir, servos, temp, rtc, etc. has become as easy as it is for arduino users just to throw some simple arguments at it and it works. If the arduino basic could do that with all the many libraries out there, jeez that would be great.
 
psergiu

Regular Member

Joined: 09/02/2013
Location: United States
Posts: 83
Posted: 07:50am 07 Aug 2014
Copy link to clipboard 
Print this post

JohnS - thanks for the links - quite a few things that i bookmarked from there - but none of them are interpreters that can be installed on a Arduino-compatible board. (Jumentum SOC is the only interpreter, but for ARM chips)

viscomjim - Looks like Tiny Basic Plus has some support for extending the language using standard libs - It currently uses SD Library and EEProm Library for storage operations. Looking at the source code, it seems that library support for new stuff won't be hard to add - the limit being the RAM usage that each library requires.

I was wondering if anyone knows of any other similar projects for Arduino hardware.

Thanks.
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 08:18am 07 Aug 2014
Copy link to clipboard 
Print this post

psergiu, I also once saw that the soldercore corebasic was being ported to a lot of other micros. The soldercore unit itself has a arduino footprint that you can put shields on and the corebasic had quite a few drivers or "libraries" for them. This was a very exciting thing to me, however, it seems that the soldercore isn't the top priority of the company right now but the porting of the code to other micros is. They have it running on quite a few dev boards out there. Something you might want to check out.

From their forum... "The CoreBASIC source code is now ported to 20 different boards! You can run CoreBASIC on all of them!"

Here is their main product

If it wasn't for their lack of support on the soldercore board itself, I never would have stumbled upon uMite. I'm not saying their hardware product is bad (its actually pretty bad ass), just not well supported at this point. Thier corebasic however is an ongoing thing as it seems...
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3998
Posted: 08:21am 07 Aug 2014
Copy link to clipboard 
Print this post

A full-featured interpreter will want lots of flash and also lots of RAM, something it's my impression Arduino boards seem very poor value at providing at anything like good value if at all.

Now I'm curious as to why it's wanted...

John
 
psergiu

Regular Member

Joined: 09/02/2013
Location: United States
Posts: 83
Posted: 10:11am 07 Aug 2014
Copy link to clipboard 
Print this post

TinyBasicPlus, in the current implementation looks to be using ~900 bytes of RAM, leaving 1100 bytes free on a 328 chip. Quite limited, but a bit more than on a Sinclair ZX81 :)

Why ? Why not. I like the idea of "fixing stuff on the go" - you just connect a serial console (phone/tablet with serial cable) and debug instead of getting the chip back to the computer to reflash. The micro-controller is no longer a slave to the big PC that has to program-it but it becomes a stand-alone computer.

For big projects or for things requiring tight timings and various libraries, Arduino-compiled code is the way to go. But for thinks like:

IF door_sensor = on OR pir_sensor = on
THEN
turn on relay for lamp
SLEEP 30 sec
turn off relay for lamp
ENDIF
GOTO beginning

it's much simpler (for me) to use BASIC and much easier to fix if you just need to have the lamp on for 5 seconds more.

I know that i can use a Micromite for this, but ... quoting George Malory when it was asked: "Why do you want to climb Mount Everest?"

"Because it's there"Edited by psergiu 2014-08-08
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3998
Posted: 11:31am 07 Aug 2014
Copy link to clipboard 
Print this post

I'm still puzzled why you'd use a Basic with so few features now that the umite exists or is it a desire to have open source or some such?

If it has to be open source, you could always use the earlier MMBasic / DMBasic and tweak it for a umite type board.

Or find something for a cheap board like from ST (NUCLEO etc). Maybe even a cheap Allwinner board?

John
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 12:30pm 07 Aug 2014
Copy link to clipboard 
Print this post

CrossWorks CoreBASIC is pretty much available for a lot of dev boards. But I agree, uMite is a game changer at least for me and the "embedded" type stuff I am working on. Not super concerned about open source, just concerned that I can do what I need to do. So far, uMite has fit the bill a few times over. I am sure, based on the all of a sudden lack of 128d's that this uMite thing may be working for a lot more projects than we know.
 
psergiu

Regular Member

Joined: 09/02/2013
Location: United States
Posts: 83
Posted: 06:19pm 07 Aug 2014
Copy link to clipboard 
Print this post

An Arduino Mini Pro clone can be had from chinese sellers for close to 2 USD, shipping included. And can be programmed with a USB data cable from an old phone.

I like the idea to make such a cheap stand-alone computer.
I also like to challenge myself to make most out of very limited hardware.
I like old & slow computers, i'm a computer history nut.

So i'm doing this for fun :)

viscomjim - reading their website, CoreBASIC seems to require more powerful CPUs.

After more searching, i found those:

More Basic versions for Arduino:
- PS2 kb + SD + LCD
- PS2 kb + SD + TV-out (uses 2 arduinos)
- A german one with COLOR COMPOSITE VIDEO (requires atmega 644 - from what i can understand)
- Another one from a russian guy
- AttoBasic - even works on ATTiny chips

And as an alternative to BASIC there's Bitlash .
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 08:24pm 07 Aug 2014
Copy link to clipboard 
Print this post

After looking at those sites, all I can say is Thank You Geoff for uMite!
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3998
Posted: 09:04pm 07 Aug 2014
Copy link to clipboard 
Print this post

hehe, poverty-spec stuff!

John
 
memberx
Newbie

Joined: 20/04/2012
Location: Australia
Posts: 24
Posted: 11:02pm 07 Aug 2014
Copy link to clipboard 
Print this post

Quote from Arduino forum, regarding Basic for an Arduino.

http://forum.arduino.cc/index.php?topic=145855.30

"Interpreter Basic is a ancient and cruel form of torture supported by masochists and the ingnorant."

Fact is Arduino 8 bit AVR simply doesn't have the resources for a decent Basic Interpreter. 99.999999% of people that know how to program in C wouldn't want to look at Basic for obvious reasons anyway.







 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2946
Posted: 11:38pm 07 Aug 2014
Copy link to clipboard 
Print this post

  memberx said  
"Interpreter Basic is a ancient and cruel form of torture supported by masochists and the ignorant."


Hi Memberx,

I always liked "Basic is the only language that takes less time to master than it takes for any program written in it to run"

(that can be looked at 2 ways)

Seriously though, if BASIC wasn't around some people, such as myself, would not be able to write any code.. I have tried several times to learn some C and it is `HORRIBLE' ... well thats my opinion... Yes its fast but my brain is wired differently than what is required by C.

Mick



Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 04:43am 08 Aug 2014
Copy link to clipboard 
Print this post

I'm with Mick on that one. My brain for some reason has a mental block when it comes to arduino stuff or C. It kills me when I see 12 year olds making cool stuff with arduinos and my old brain can't deal. Jeez...
 
psergiu

Regular Member

Joined: 09/02/2013
Location: United States
Posts: 83
Posted: 08:26am 08 Aug 2014
Copy link to clipboard 
Print this post

  memberx said  
"Interpreter Basic is a ancient and cruel form of torture supported by masochists and the ingnorant."


Well ... i guess i'm the former then :)

I'll try installing install those that i linked and write a mini-review for each on the precent of usefulness compared to a 'mite. :)
 
kiiid

Guru

Joined: 11/05/2013
Location: United Kingdom
Posts: 671
Posted: 06:01pm 08 Aug 2014
Copy link to clipboard 
Print this post

  bigmik said  
Seriously though, if BASIC wasn't around some people, such as myself, would not be able to write any code.. I have tried several times to learn some C and it is `HORRIBLE' ... well thats my opinion... Yes its fast but my brain is wired differently than what is required by C.


About 20 years ago I would have probably said the same thing (with a bit more passion, though), as back then Pascal was my main language of choice closely followed by Basic.
Now I would say that C is a brilliant language which allows fiddling with code to a level otherwise impossible. There are a few things in C which I particularly dislike, such as its natural tendency to spread over hundreds of files for a larger program, the header files in general, and the ugly curly brackets. But those are livable issues. Adding the ++ stuff though is a different matter - then I completely agree with the "horrible" statement.
But let's not forget that a good Basic (or any other) interpreter cannot be written well in Basic. Only C is the choice for those who make the higher level languages.


http://rittle.org

--------------
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 12:46pm 09 Aug 2014
Copy link to clipboard 
Print this post

  kiiid said  
But let's not forget that a good Basic (or any other) interpreter cannot be written well in Basic. Only C is the choice for those who make the higher level languages.


@kiiid, with some exceptions:
- Great Cow Basic compiler is written in FreeBasic - made in Australia;
- Pic Micro Pascal is written in Delphi (Object Pascal) - made in France. Edited by vasi 2014-08-10
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
kiiid

Guru

Joined: 11/05/2013
Location: United Kingdom
Posts: 671
Posted: 12:53pm 09 Aug 2014
Copy link to clipboard 
Print this post

  vasi said  
- Great Cow Basic compiler is written in FreeBasic - made in Australia;
- Pic Micro Pascal is written in Delphi (Object Pascal) - made in France.


Both are compilers, not interpreters

http://rittle.org

--------------
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 01:26pm 09 Aug 2014
Copy link to clipboard 
Print this post

Yeah, this one started as a Pascal project, but it seems that the author came to the same conclusion and converted the project to C.
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
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