Anyway, posting this not only because I was a big fan of Basic / Visual Basic, but I know that there are at least 1 or 2 members here (and maybe more), who really like this language, and I do too!
The robot in the icon image I use with my posts was programmed using FreeBASIC, a language I have used for over 10 years. It compiles to very fast code so I was able to write fast visual processing software that would normally have required c++.
Although I like the BASIC language (modern versions) I am not adverse to using C++ for the Arduino as it is also the language I used to use on the PC.
I downloaded B4R on the PC but really couldn't figure out how it is used, no simple beginner tutorials. It is unclear for example how I would write and install on the Arduino a BR4 version of an Arduino C++ program.
I downloaded B4R on the PC but really couldn't figure out how it is used, no simple beginner tutorials. It is unclear for example how I would write and install on the Arduino a BR4 version of an Arduino C++ program.
Really? there are tutorials, and not very difficult, actually...
it talks about a mobile phone so does it compile stand alone code for the Arduino or does it require a mobile phone to be part of the solution?
I don't see an example written with the Arduino IDE followed by its equivalent written in BXR pop out at me just talk about web pages forms frameworks ...
Where is the setup and loop function? A direct one to one translation from Arduino c++ to BASIC. I assumed a simple Arduino BASIC IDE.
So I will just stick to using Arduino C++ IDE to code the Arduino.
I downloaded B4R on the PC but really couldn't figure out how it is used, no simple beginner tutorials. It is unclear for example how I would write and install on the Arduino a BR4 version of an Arduino C++ program.
Really? there are tutorials, and not very difficult, actually...
Just run the .exe, and provide your relevant parameters, and should be good to go?
Cheers
As a user of VB and VBA for many years, I find this B4X somewhat intriguing , but the limitation of some of the functions , like string manipulations, and memory allocation of variables in Dim statements look to be somewhat daunting and complex as compared to VB..
Having said that, I'm still trying to learn C++ for Arduino, so I'll just keep moving forward on this until I get a good handle on how to efficiently use C++.. Thanks for posting this information..
Thought I might still have a play with language so I also installed B4R
Loading one of their examples I hit my first obstacle, path configurations, something that always gave me trouble. Fortunately with some other languages this is automatic and requires no inner knowledge of how to do all that stuff. Often I get DO x with the assumption you actually know how to do x and no option to have it explained.
With FreeBasic I just choose Save As and then navigate to the desired location in which to save the program.
To enlarge image, right click image and choose Open link in new window.
Yep.. nothing is ever easy that is worth while..hence, the quest to learn is ever on-going..
And then you die and all that learning vaporizes 🙂 People do like a challenge. They even create conflict (sport) to satisfy that need.
However if you make it hard when it doesn't have to be hard you just prevent yourself achieving more.
Imagine if you didn't have the Arduino development system to program the ATmega328P and instead had to use a hex key and machine code like I had to do in the early days with the 8085.
Making it easy means making it possible for more people to achieve more in less time than they would have done otherwise. I could be up and running with B4R right now instead of having to find time to figure out these path configuration requirements.
When Windows came out programming something that was easy with QBASIC became very very complex requiring a deep understanding of C++ and its Window's API programming environment. Then along came FreeBASIC and you could write the same program with a few statements. Same result, one requiring a year's training, the other a week's training.
A simple but well supported language I would recommend to anyone wanting to interface to their hardware is the Processing language. Unlike B4R it is well supported with lots of easy tutorials and library support. It's IDE is like the Arduino C++ IDE.
"Imagine if you didn't have the Arduino development system to program the ATmega328P and instead had to use a hex key and machine code like I had to do in the early days with the 8085."
Yep.. remembers those days too!.. Wrote my first machine code for my old TRS-80 16 k and Zlog 8080 compiler back in 1979. It was a clock on the monitor display...it worked pretty well except when you used a for-next loop statement, it stopped the clock and lost some time.. I didn't know about IRQ's then, so had not considered it obviously...lol
It worked by inserting a jump instruction into the 55 byte code for the keyboard de-bounce routine..Indeed, I know all about how to do things the hard way..but it gave me insights into how the processor worked, and made it easier to advance my knowledge of programming in general.. But don't get me wrong, easier is a good thing, but I just like to know things.. it's the technician in me I guess.. Troubleshooting is an art that I learned over 50 years ago..I'll get around to this BR4 thingy soon enough..just right now I have to contend with learning C++ a bit more so I can use my PID control algorithm on my tank robot to make it more autonomous..
it talks about a mobile phone so does it compile stand alone code for the Arduino or does it require a mobile phone to be part of the solution?
I don't see an example written with the Arduino IDE followed by its equivalent written in BXR pop out at me just talk about web pages forms frameworks ...
Where is the setup and loop function? A direct one to one translation from Arduino c++ to BASIC. I assumed a simple Arduino BASIC IDE.
So I will just stick to using Arduino C++ IDE to code the Arduino.
Hmm, not sure how you ended up at that page exactly, but the link I provided gave the exact installation and config details you need to get going right away?
Where is the setup and loop function? A direct one to one translation from Arduino c++ to BASIC. I assumed a simple Arduino BASIC IDE.
As this is an IDE for using Basic, there is no Setup() and Loop() functions per se, but there is an AppStart sub routine which acts like the Setup() function in Arduino, and you can code the Loop() function yourself if you want it, but better without it and using timers or both if you want.
Thought I might still have a play with language so I also installed B4R
Loading one of their examples I hit my first obstacle, path configurations, something that always gave me trouble. Fortunately with some other languages this is automatic and requires no inner knowledge of how to do all that stuff. Often I get DO x with the assumption you actually know how to do x and no option to have it explained.
With FreeBasic I just choose Save As and then navigate to the desired location in which to save the program.
To enlarge image, right click image and choose Open link in new window.
Again, the link I provided stated that you need to configure the path and select the board etc... before you can use it, so I'm not surprised you got that message.
I set mine up using those instructions (it was very easy... you should know the path to arduino.exe and your sketch folder for library path), and was able to download a simple blink sketch and run it immediately without issue - I then played around a little with it and came up with some additions to it, as well as renaming bits and pieces to suit myself.
Here is the example I compiled and ran a short time ago, which is Basic in nature 😉
Log writes directly to the serial object as well, as the following putty connection demonstrates:
Wrote my first machine code for my old TRS-80 16 k and Zlog 8080 compiler back in 1979.
Two oldies 🙂 Good old TRS-80. I remember buying it wondering if I would really be able to program it. Good documentation and tutorials made it easy. My first assembler code was my version of the draw line function. I used fixed point by treating the BC, DE, HL as fixed point variables B.C, D.E, H.L which I thought was clever at the time, it was only later I came across the Bresenham algorithm.
C++ is a great language despite its awkward squiggly brackets and Arduino C++ is really easy to use. I started with Turbo C++ on the old MSDOS machines.
We use cookies on the DroneBot Workshop Forums to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.