I want to use C or C++

Mostly because i work using C++ in the office and feel at home with it. (plus i get wierd looks when i tell people i use basic to make my robot, mostly faces that resemble smelling a fart)

I gather i cannot do it using the picaxe stuff... Do many peopl here use C for their projects? How do i do this and what would i need?

Most of the roboteurs here

Most of the roboteurs here use microcontrollers - i am a completely new to that realm. Thats one of the reasons i have a pc driving my bot .

It currently is running a java framework - with JNI device interfaces programmed in C.

Sorry I could not be of more help.

GroG.

I would go for C and the
I would go for C and the PIC18F series, as the 18F series operates on C, and is optomized to work on it.

If you’re a robotics

If you’re a robotics beginner, I’d go for the Arduino platform, since this is designed for beginners and the language is based on C/C++. Arduino is based on the Atmel AVR family of microprocessors and C compilers for this platform are free as opposed to the PIC where you have to pay for a C-compiler AFAIK.

If you don’t like to get your hands wet with too much electronics stuff, you could go for some development board for either Atmel AVR microcontrollers (uC from now on) or ARM7 uC’s. Both of these uC-families have the GNU chain of compilers/linker/… available so you can write your programs in C or C++ and just use GCC to compile and link them. Development boards are small boards with the uC of choice embedded in an environment that typically includes an LED, an LCD display, maybe some relays, a buzzer, some buttons and an extension header where you can connect a limited amount of pins to.

Atmel AVR family is very popular and is much cheaper to use than ARM7 stuff, but of course the ARM7 uC’s have a great deal more power - they typically run at 60 MHz with something like 32-64 KB RAM and even more program flash memory.

You can get cheap and good development boards at http://www.olimex.com

Of course there are also ARM9 uC’s at http://www.embeddedarm.com but now the prices are beginning to get a bit out of hand unless you have a serious budget for your robot hobby :-). But here we’re talking 500 MHz uC that runs a linux distro off of a 1GB flash drive! That would be kind of a nice environment :slight_smile:

Thank you! This is
Thank you! This is incredibly helpful to me. i will investigate

make controller

It’s not cheap, but I’m using a SAM7 based microcontroller called a make controller(http://www.makershed.com/ProductDetails.asp?ProductCode=MKMT1)

It’s basically an ARM7TDMI clone with a real nice application board to give you quick access too all the neat stuff the chip can do. It has a pretty good C API and uses FreeRTOS to provide some basic OS functionality, like threads and interrupts.

anyway, I like it a lot so far, but for the more casual and cheaper choice I’d prolly pick an arduino too, that was my second choice but I decided to go all-out and spend the money for the make controller :wink:

:slight_smile:

SDCC Small Device C Compiler

SDCC is a free open source C compiler which is specially engineered to get the most performance out of 8-bit devices. It is a mature product in active development and supports many different microcontroller architectures (though the authors recently abandoned support for AVRs). In particular, SDCC supports the PIC18 and (most) PIC16 series of microchip microcontrollers.

http://sdcc.sourceforge.net/

In addition to being able to get a very high quality C compiler for free, you can also obtain most kinds of microchip products for free through their online sample program, which is great once you start making your own boards or if you are using a breadboard for rapid prototyping.

http://microchip.com

C but not C++

Beware when using small microcontrollers that you stick to ordinary C and not C++. It’s not essential, but just be aware that some types of C++ code can take up a large amount of memory, which your microcontroller hasn’t got. If you stick to the basics of C, you have a much better chance of producing a small program.

Personally, I use the Atmel AVR chips in either assembler or C. I use the Gnu C compiler, GCC. I use either the Winavr package for Windows or the raw GCC sources for Linux. There’s a program called AVRdude to drive the AVR programming gadgets from Linux, and I think it works on Windows too. Not too sure about Mac support, but now that MacOS is Unix-based, somebody must be working on it!

I’m C/C++ old-timer too, but

I’m C/C++ old-timer too, but I don’t see anything wrong writing your stuff in Basic or any other language. What’s in the language? Moreover, what’s in the platform? :slight_smile: Those are just engineering tools you use, they should meet your goals and needs, including speed of development. When rapid prototyping can be done faster in Basic or C# or any other language, go for whatever is more convenient from technical/business perspective. The result is important rather than tools. (I’m talking about any SW development, not just robotics.)

In my humblest opinion, it would a bit ridiculous to start working with C just because I’m old-timer C guy, if all I need is to build a simple one-mission bot (line follower, photovore, drum machine, etc) which can be done in Basic as well and the development platform is THAT simple and easy to use.

From the other hand, I’m planning to move to some other platform (PIC or AVR etc) a bit later, as I start building more advanced stuff. But even then, PICAXE-40 will still be an option. It would rather depend on what a platform can offer as a whole.