Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: Shags on February 19, 2008, 06:11:34 PM
-
I was wondering if I could get some favorite microcontrollers (adapted). I am not going to try and build one for my first attempt at this and programming is my strong suit. So.... I am asking for some favorites out there. I was going to buy the Acroname Brainstem GP 1.0 as my starter but I believe they just discontinued it. Cerebellum is on hold for a new board. Anyway, let me know if you have a favorite and whether it can be programmed in C, C++, or Java (prefer C++). Reasons why you love it would be much appreciated too. Thank you in advance.
-
http://www.oopic.com/
http://www.oopic.com/langlist.htm
-
PIC or the PICAXE are my fav PICAXE is good for beginners it is programed in BASIC but PIC you can get a C compiler for. (C++ not generally used to program MCUs).
-
Arduino
http://www.arduino.cc/
Its based on Atmel microcontrollers, so pretty much similar to the one used in $40 robot tutorial.
1) Open source, hardware design is also open source.
2) Inexpensive. you can get one for $25 assembled and tested
http://moderndevice.com/
-
I like the Robostix http://gumstix.com/store/catalog/product_info.php?cPath=31&products_id=139
Or you could wait for the SOR board which will have more flash and ram, and more pins.
But overall I like AVR's. You get to use gcc which is a well trusted compiler. There are Open Source Real Time Operating Systems for it if your project has a lot of complexity (http://www.freertos.org/). There is also a decent library that you can use, or at least see how things could be done (http://hubbard.engr.scu.edu/embedded/avr/avrlib/docs/html/index.html).
-
Thanks for helping on this one. I got a chance to review all of the boards and I think they all meet what I am looking for. The one that I am going to order is the arduino board. I liked it best because it was available as a kit and since I want to learn the electronics to help my knowledgebase I am thrilled to find this offering in kit form. I got the benjamins but I really want to learn how to do it all so I am going to get busy with my soldering iron and multimeter and have fun doing it.
The other thing I loved about it was that it is open source which really appeals to the programmer in me (my strong suit) so I look forward to contributing to its continued development and freedom to get down deep in the code and make it do things unexpected (and probably burn it up but how are you going to learn?).
I also liked the OOPic that was suggested because it is object-oriented by design (so is arduino) but I couldn't find anything on their website about creating objects. I only found code that explained using existing objects.
The PIC and PICAXE are fine but I really would like to stay object oriented and the Gumstix I really think I will definitely use on an upcoming project but this first one I think I will give arduino a try.
To wrap up the clincher was the open source community and the fact I can buy the arduino as a kit (how cool is that?!?) so I can really get a feel for what makes a microcontroller click.
Please continue to post. I know it was the first question I had as a newcomer so I am sure someone else can benefit from your suggestions based on what their strengths are.
Thanks again everyone!!!
-
Sorry for the double post. I went ahead and ordered the BBB parts kit at moderndevice.com, but I also ordered the USB-to-TTL serial cable and a really cool mini microcontroller. Check this out when you get the chance http://moderndevice.com/RBBB.shtml. Its a toy but it would be cool to turn it into a micro-robot. I will let you know how that turns out.
-
http://www.societyofrobots.com/robot_faq.shtml#best_microcontroller
-
Looking for a microcontroller I can use C++ or C on
Like any of them on the market?
-
Thanks for the tips Admin and paulstreats. I think I made the best choice for me in Arduino (Freeduino). Yes just about all of the microcontrollers allow you to program in C (a couple in C++) but I also noticed that a lot of microcontrollers that advertise that you can program them in C++ really mean that we have these objects created for you to make everything turn on and off and you can use our objects to make your robot run. I couldn't find anything on (for example the OOPic site) that said anything about creating your own objects (I don't mean functions I mean full Class Objects). Also a lot of the microcontrollers out there are programmable in C with some support for C++, but I think they may be actually saying you can program it in C++ as long a it is recognized in C as well (C++ is backward compatible with C). Start trying to create classes and I think one will find out in a hurry that much of the additional functionality added to C++ won't be there. What attracted me to the Arduino board is that there is an open source community that works directly with the board (or so I gathered from their site). All of the code that makes each function of the board work is there for download and manipulation. This means (at least I hope so) that I should be able to program the board the way I want to and hopefully learn in the process how to create my own microcontroller.
Admin your post on the "whats the best microcontroller" is right on. The user does definitely define the definition of "Best". In my case its a board with the most freedom programmatically rather than some of the other features (even number of i/o's) is going to be the sell factor for me. If I can fully understand the software/hardware relationship down to the microlevel then my purchase is a success and who knows maybe I will someday come up with the "better mousetrap"
-
I work on a project that does Object Oriented Design in C. I think if you are a disciplined designer, you really don't need C++. There are some features that are nice (Inheretance and Polymorphism) but if you know your C, you really don't need the ++. Just make wise use of structures and it will all fall into place. Generally you want to make a YourClassName.h that has all the things like this:
typedef enum
{
// Any enumerations that the class might use.
}YourEnum_E;
typedef struct
{
// Your class members here
UInt8_T data
}YourClassName_T;
Then implement the functions in a YourClassName.c
#include 'YourClassName.h'
void incrementData (YourClassName_T * this)
{
this->data++;
}
And don't forget to have an YourClassNameInstances.h and YourClassNameInstances.c where you declare and define all your instances since you are working on a micro and have no dynamic memory to for constructors.
At least that's how we roll at work.