Spark Logic

B.A.S.I.C. for Arduino

simonf Sun May 29, 2016 10:56 pm

I came across this whilst trawling the internet a BASIC complier for arduino. It can be found at https://www.b4x.com/b4r.html. You can embed ‘C’ code and compiles / Uploads using the standard arduino.exe. At a guess it cross complies the basic code into some ‘C’ equivalent and then this is compiled and uploaded by arduino.exe.

I know all the purists out there will say you should be using a real language for this type of job blah blah blah. But if you just want to code something that turns a heater on if the temperature is too low and a fan on if the temperature is too high etc then it maybe the ideal thing. You can apparently look at the code it produces but I haven’t tried it yet. If so people could use it as a basic to C dictionary.

It looks like it may work with stm32 with a little alterations as it uses a boards.txt file to add extra boards.

You can also call existing ‘C’ functions by using a RunNative so you can write wrappers for existing ‘C’ Libraries.

I will have a play with it next week and see how good/bad it is.

PS they also do the same for android and IOS so you can write a project which works partly on an android device an iphone and arduino and only use one language.

Replies

simonf Wed Jun 15, 2016 6:38 pm

mrburnette wrote:RogerClark wrote:Offtopic… but just a note, that the GD32F103C8 only has 64k not 128k as its internal architecture is quite different.

simonf Wed Jun 15, 2016 6:55 pm

starchild wrote:I have got B4R to compile successfully for the STM32Nucleo F103

I can post my B4R mods if anyone is interested.

mrburnette Wed Jun 15, 2016 9:32 pm

simonf wrote:
<…> And you give the GD32F103C8 a -1.

simonf Wed Jun 15, 2016 10:20 pm

mrburnette wrote:simonf wrote:
<…> And you give the GD32F103C8 a -1.

starchild Thu Jun 16, 2016 7:38 am

simonf wrote:starchild wrote:I have got B4R to compile successfully for the STM32Nucleo F103

I can post my B4R mods if anyone is interested.

starchild Sat Jun 18, 2016 5:08 am

simonf wrote:starchild wrote:I have got B4R to compile successfully for the STM32Nucleo F103

I can post my B4R mods if anyone is interested.

RogerClark Sat Jun 18, 2016 5:42 am

Any chance you can attach the PDF to your post, as to view it on the B4x site you need to have an account :-(

starchild Sat Jun 18, 2016 8:44 am

RogerClark wrote:Any chance you can attach the PDF to your post, as to view it on the B4x site you need to have an account :-(

RogerClark Sat Jun 18, 2016 9:34 am

Thanks

Sign in to reply