BasicMicro - Forums

www.basicmicro.com
It is currently Sun Sep 05, 2010 11:25 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Arduino
PostPosted: Wed Jul 28, 2010 3:29 pm 
Offline
Guru

Joined: Tue Jun 22, 2010 1:15 pm
Posts: 51
I looked at it long enough to know I didn't want to do anything with it.

But if you can make a LIB to work with their boards, so much the better! And C can also gain from a new LIB or two.

the C shouldn't change, just refining of the LIB files.

Good H files with comments can go a long way to setting up a project with new hardware. I don't know why that's such a difficult task/concept for new (casual) programmers to grasp. But then BASIC was originally written so that one wouldn't have to think about what type of variables he/she wanted...

Alan KM6VV


Top
 Profile E-mail  
 
 Post subject: Re: Arduino
PostPosted: Wed Jul 28, 2010 4:21 pm 
Offline
Master

Joined: Tue Nov 21, 2006 9:34 am
Posts: 291
I don't want to get into a set of religious wars, but I am a C kind of guy... Before you shoot me, I like your products too, or I would not have stuck with them this long... :)

Some reasons why I think Arduino have been successful.
1) It is pretty simple to start out to use. Here is a complete simple hello world sketch
Code:
void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println("Hello World!");
}

2) Performance and capability wise they probably blow the socks off of a Basic stamp. I think the low end Arduino probably have 32K or program space and 1 or 2 K of memory run at 16 or 20mhz. The Arduino Megas have 128K or program space, 4 usarts, 12 PWM channels, 16 Analog inputs. 50+ digital inputs ...

3) Cost: You can get a simple Arduino for $20, one with USB $30, a Mega which also has USB for $65 (these are all sparkfun). You can get other versions of a Mega for under $50 from other vender's.

4) Ease to expand the environment. For example in another thread you ask for ideas on what commands to add to Basic. Up in the Arduino world, if there is a need for some new commands, it can be done by anyone. (Yes I know this can be a double edged sword), But for example recently someone saw that there was no standardized easy to use PS2 code on the Arduino. So he created it and posted it. Now all you have to do is to copy the .c++ and .h files for the new library into the appropriate Arduino directory and then in any sketch you wish to use it, you simply tell the system that you wish to use it and you are free to use its methods. He created a really nice version that takes care of remembering the previous states of the buttons and the like, so you can write code and simply ask if a button has just been pressed...

Also since you have the source file available for the new objects, you are fee to customize it to make it work in your environment, fix bugs and learn how to do things...

5) Also if you wish to return to be strictly a C/C++ kind of guy you still have all of the GNU GCC stuff available to you (again free). You can simply use AVRDUDE to program the boards outside of the Arduino environment. You can easily port your sketches back to C with the main line looking something like:
Code:
int main(void)
{
   init();

   setup();
   
   for (;;)
      loop();
       
   return 0;
}


Yes, I know there are downsides as well, like there is no debug mode to make it easy to debug your programs... I hate that the normal boards do not have servo connectors, but it is a different mindset. Their idea is it is great for prototyping things. One of these boards, a wireless breadboard and some wire is all you need...

My main point is to say that they do have a lot of interesting stuff going for them, so I can understand their popularity.

Kurt

P.S. - Again I am not wanting to get into religious war, like C versus basic!!!


Top
 Profile  
 
 Post subject: Re: Arduino
PostPosted: Thu Jul 29, 2010 10:48 am 
Offline
Guru

Joined: Tue Jun 22, 2010 1:15 pm
Posts: 51
Good points Kurt!

I totally agree, and am similarly interested primarily in C.

But the convenience of the Atom Pro for R/C servo motor control, and PS/2 support is hard to beat! Besides, a little BASIC won't hurt, and it's easier to share projects if they are based on BASIC.

Alan KM6VV


Top
 Profile E-mail  
 
 Post subject: Re: Arduino
PostPosted: Thu Jul 29, 2010 8:08 pm 
Offline
Guru

Joined: Tue Jun 22, 2010 1:15 pm
Posts: 51
There is a C interpreter, PicoC, that runs on my BlackFin Camera. It runs in either an interpreter or loaded (EEPROM) mode. It doesn't use includes or a main() either.

The source is available, maybe it would be a good candidate for an AtomPro.

Alan KM6VV


Top
 Profile E-mail  
 
 Post subject: Re: Arduino
PostPosted: Tue Aug 10, 2010 12:50 am 
Offline
Master

Joined: Mon Jul 17, 2000 10:00 am
Posts: 151
Yes all that hardware sure is pretty, but with out the math hardware and 32bit registers I'll pass. As a user I would want an upgrade not a down grade ;-)

If C is your thing GNU has been around allot longer and for better processors.

_________________
Basic Stamp - On Steroids!
DC Motor Speed Control - Robo Claw!
Servo Controller - ARC32!


Top
 Profile E-mail  
 
 Post subject: Re: Arduino
PostPosted: Tue Aug 10, 2010 7:14 am 
Offline
Master

Joined: Tue Nov 21, 2006 9:34 am
Posts: 291
Basic Micro wrote:
Yes all that hardware sure is pretty, but with out the math hardware and 32bit registers I'll pass. As a user I would want an upgrade not a down grade ;-)
Hi Dale, I totally understand your position here! :D I hope I made this clear earlier. I really like the H8 architecture! I enjoy having 32 bit registers and the math that goes with it. I find it far easier to program it in assembly language. I can totally understand your decision to stick with H8 based systems.

As for upgrade versus downgrade, good question, everything is a trade off... :lol:

Basic Micro wrote:
If C is your thing GNU has been around allot longer...

I totally agree here. There are far better free IDEs than what comes with the Arduino, but I suppose, many may decide when in Rome do...

Kurt


Top
 Profile  
 
 Post subject: Re: Arduino
PostPosted: Tue Aug 10, 2010 1:56 pm 
Offline
Guru

Joined: Tue Jun 22, 2010 1:15 pm
Posts: 51
Dale,

Not suggesting another processor is better, just noting that there is a C interpreter (PICOC) with source available, that might make an interesting port to the Renisys parts.

I know, how about a Renisys camera!

Actually, I'm not to keen on GNU. I prefer good "canned" commercial products ($$).

Alan KM6VV

Basic Micro wrote:
Yes all that hardware sure is pretty, but with out the math hardware and 32bit registers I'll pass. As a user I would want an upgrade not a down grade ;-)

If C is your thing GNU has been around allot longer and for better processors.


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO