Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

Programing choices

Anything that doesn't fit our other forums goes here.
12 postsPage 1 of 1
12 postsPage 1 of 1

Programing choices

Post by Orac » Tue Apr 03, 2007 2:39 pm

Post by Orac
Tue Apr 03, 2007 2:39 pm

Ok, I am re-learning assembly language programming on the PIC's to get myself back into it again after about 8 years absence.

Its all coming back to me, fairly easy, fighting my way through MPSIM, etc.

What I am now thinking about is what higher level language would be best for me to learn. I did some C at Uni, forgotten most of that, except the frustration of syntax errors, etc that used to bug the hell out of me.

There are a wonderful variety of languages available, and I know there is no "right answer" but can people suggest their favourite language from a robotic development point of view.

Thanks
Ok, I am re-learning assembly language programming on the PIC's to get myself back into it again after about 8 years absence.

Its all coming back to me, fairly easy, fighting my way through MPSIM, etc.

What I am now thinking about is what higher level language would be best for me to learn. I did some C at Uni, forgotten most of that, except the frustration of syntax errors, etc that used to bug the hell out of me.

There are a wonderful variety of languages available, and I know there is no "right answer" but can people suggest their favourite language from a robotic development point of view.

Thanks
Last edited by Orac on Tue Apr 03, 2007 8:57 pm, edited 1 time in total.
Orac
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 299
Joined: Wed Feb 21, 2007 12:46 am
Location: UK, Near Aylesbury

Post by Robo1 » Tue Apr 03, 2007 7:42 pm

Post by Robo1
Tue Apr 03, 2007 7:42 pm

depends what it will be complied to.

I like java if it's going to run on a PC, as for on board processing I'm looking at FPGA's boards and programming them with C type language.

Bren
depends what it will be complied to.

I like java if it's going to run on a PC, as for on board processing I'm looking at FPGA's boards and programming them with C type language.

Bren
Robo1
Savvy Roboteer
Savvy Roboteer
Posts: 501
Joined: Fri Jun 30, 2006 1:00 am
Location: UK - Bristol

Post by Humanoido » Mon Apr 09, 2007 5:49 pm

Post by Humanoido
Mon Apr 09, 2007 5:49 pm

I'm having a great time with RoboBasic. It's very enjoyable to use and has all the commands and statements necessary to develop some remarkable servo motion control, yet still manage sensors, and handle speech, sonar, sound, bluetooth, battery sensors, LEDs, gyros, accelerometers, IR controllers, and more.

humanoido
I'm having a great time with RoboBasic. It's very enjoyable to use and has all the commands and statements necessary to develop some remarkable servo motion control, yet still manage sensors, and handle speech, sonar, sound, bluetooth, battery sensors, LEDs, gyros, accelerometers, IR controllers, and more.

humanoido
Humanoido
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 574
Joined: Tue Dec 05, 2006 1:00 am
Location: Deep in the Heart of Asia

Post by PaulP » Thu Apr 12, 2007 12:37 am

Post by PaulP
Thu Apr 12, 2007 12:37 am

Hi Orac

Might I be so bold as to say 'learn C'

As you probably know I spend most of my time in VB6 and VB.NET but recently with my latest bot mod I have had my head buried in Atmel and PIC programming. There are lots of different compilers based around Basic, Pascal, Fortran and others but the one thing that seems common to me is that all the processors can be programmed in C. Atmel do a stunning application called AVR Studio that uses a gnu licensed compiler especially for it. There are also flavours of the compilers for other types of chips but they all use C. I, like yourself did some C a long time ago under DOS and have forgotten what little I learnt. I'm struggling to get back into it now but I have found a few books and I'm getting there....


I think....
Hi Orac

Might I be so bold as to say 'learn C'

As you probably know I spend most of my time in VB6 and VB.NET but recently with my latest bot mod I have had my head buried in Atmel and PIC programming. There are lots of different compilers based around Basic, Pascal, Fortran and others but the one thing that seems common to me is that all the processors can be programmed in C. Atmel do a stunning application called AVR Studio that uses a gnu licensed compiler especially for it. There are also flavours of the compilers for other types of chips but they all use C. I, like yourself did some C a long time ago under DOS and have forgotten what little I learnt. I'm struggling to get back into it now but I have found a few books and I'm getting there....


I think....
PaulP
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 153
Joined: Fri Jan 19, 2007 1:00 am
Location: West Mids, United Kingdom

Post by Humanoido » Thu Apr 12, 2007 7:24 am

Post by Humanoido
Thu Apr 12, 2007 7:24 am

Indeed, C language is very capable and ideally suited for various aspects of motion control. Visual Basic and C can go hand in hand as well. But those languages have a steep learning curve. A person can quickly get up to speed on the language mentioned in my previous post. It depends on how fast you want to go, and which features are absolutely needed. I like to compare two languages and look at the instruction set. Then I decide by the available statements and commands, or capabilities of each language. You can find command listings for any language or version on the net, and this should help. Plus many tutorials are online for getting started.

Another thing you may want to do is look at the amount of support for the controller. Are there programming examples? Examples can make the learning experience faster and more pleasing. Another choice is to learn more than one language. This is the approach I took, which makes it more easy to decide on which language for which application. Sometimes you are stuck with only one implementation on a particular controller. So shopping wisely for hardware and the support to go with it is important.

humanoido
Indeed, C language is very capable and ideally suited for various aspects of motion control. Visual Basic and C can go hand in hand as well. But those languages have a steep learning curve. A person can quickly get up to speed on the language mentioned in my previous post. It depends on how fast you want to go, and which features are absolutely needed. I like to compare two languages and look at the instruction set. Then I decide by the available statements and commands, or capabilities of each language. You can find command listings for any language or version on the net, and this should help. Plus many tutorials are online for getting started.

Another thing you may want to do is look at the amount of support for the controller. Are there programming examples? Examples can make the learning experience faster and more pleasing. Another choice is to learn more than one language. This is the approach I took, which makes it more easy to decide on which language for which application. Sometimes you are stuck with only one implementation on a particular controller. So shopping wisely for hardware and the support to go with it is important.

humanoido
Humanoido
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 574
Joined: Tue Dec 05, 2006 1:00 am
Location: Deep in the Heart of Asia

Post by PaulP » Thu Apr 12, 2007 1:58 pm

Post by PaulP
Thu Apr 12, 2007 1:58 pm

Well said Humanoido....

Its also a good idea to research what else they controllers have been used in as this gives and idea as to the level of support you are likely to get though with PIC and Atmel its pretty diverse..

If I'm not mistaken, isnt the Atmega128 already used in the RN?
Well said Humanoido....

Its also a good idea to research what else they controllers have been used in as this gives and idea as to the level of support you are likely to get though with PIC and Atmel its pretty diverse..

If I'm not mistaken, isnt the Atmega128 already used in the RN?
PaulP
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 153
Joined: Fri Jan 19, 2007 1:00 am
Location: West Mids, United Kingdom

Post by Orac » Thu Apr 12, 2007 4:15 pm

Post by Orac
Thu Apr 12, 2007 4:15 pm

Thanks all, I have had a little play with VB this week. I spend lots of time on the train and wanted to learn VB on my works laptop. After being forced to upgrade it to XP SP2 and then add the .NET software, many applications used for my job stopped working so i ended up uninstalling it all and cursing Microsoft to the amusment of many rail passengers.

I think I will have to bite the bullit and chose C. I have an old copy of the Borland complier somewhere that I can use to re-familiarize myself with it. May even have a few dusty old books around.

I will have a good look at AVR Studio aswell .

Cheers
Thanks all, I have had a little play with VB this week. I spend lots of time on the train and wanted to learn VB on my works laptop. After being forced to upgrade it to XP SP2 and then add the .NET software, many applications used for my job stopped working so i ended up uninstalling it all and cursing Microsoft to the amusment of many rail passengers.

I think I will have to bite the bullit and chose C. I have an old copy of the Borland complier somewhere that I can use to re-familiarize myself with it. May even have a few dusty old books around.

I will have a good look at AVR Studio aswell .

Cheers
Orac
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 299
Joined: Wed Feb 21, 2007 12:46 am
Location: UK, Near Aylesbury

Post by Humanoido » Fri Apr 13, 2007 11:04 am

Post by Humanoido
Fri Apr 13, 2007 11:04 am

The brain and heart of the ROBONOVA-1 is the well-known ATMEL ATMega 128 processor, its internal memory supplemented by a 64K*8 EEPROM as storage for Robo-Script and Robo-Basic programs.

humanoido
The brain and heart of the ROBONOVA-1 is the well-known ATMEL ATMega 128 processor, its internal memory supplemented by a 64K*8 EEPROM as storage for Robo-Script and Robo-Basic programs.

humanoido
Humanoido
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 574
Joined: Tue Dec 05, 2006 1:00 am
Location: Deep in the Heart of Asia

Post by PaulP » Fri Apr 13, 2007 5:18 pm

Post by PaulP
Fri Apr 13, 2007 5:18 pm

Just for the record, my KHR-1HV now has an Atmega128 in the front and an Atmega8 in the back..

It may sound daft but there are reasons.

I'm struggling with C and AVR Studio 4 myself.... Download a copy of the avr-libc-user-manual-1.4.5.pdf and study it. Also spend some time on AVRFreaks.net, those guys, although a bit curt and short-tempered really do know their stuff..
Just for the record, my KHR-1HV now has an Atmega128 in the front and an Atmega8 in the back..

It may sound daft but there are reasons.

I'm struggling with C and AVR Studio 4 myself.... Download a copy of the avr-libc-user-manual-1.4.5.pdf and study it. Also spend some time on AVRFreaks.net, those guys, although a bit curt and short-tempered really do know their stuff..
PaulP
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 153
Joined: Fri Jan 19, 2007 1:00 am
Location: West Mids, United Kingdom

Post by Humanoido » Sun Apr 15, 2007 8:23 am

Post by Humanoido
Sun Apr 15, 2007 8:23 am

Just curious, how do you integrate the two controllers together so that one knows what the other is doing?

humanoido
Just curious, how do you integrate the two controllers together so that one knows what the other is doing?

humanoido
Humanoido
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 574
Joined: Tue Dec 05, 2006 1:00 am
Location: Deep in the Heart of Asia

Post by PaulP » Thu Apr 19, 2007 1:09 am

Post by PaulP
Thu Apr 19, 2007 1:09 am

This bit i recently got working...

#####this bit works fine so far....
The 128 has 1 UART listening to the PC, the other listening to the SSC.
Whatever arrives from the PC is wrapped to the SSC and vice versa.
The 128 watches for servo position commands and keeps track of them in 32 integers. If the bot falls, it can tell which way the bot is lying and execute the correct sequence of stored procedures to get up.


####this bit im working on now so it may change#####
When the gyros indicate that the bot is leaning the 128 calculates how much the relevant servos need to be adjusted by and sends the commands to the SSC. Any further commands that arrive from the PC for the adjusted servos have the offset added or subtracted as they arrive....

My current problem is how to deal with the bot moving. I tried turning off gyros while walking / moving and switching on when a home position is recognised but that doesnt solve the problem of walking on uneven terrain...It also seems to defeat the point of gyros somewhat...

Anyway, sorry for the hi-jack....

More in keeping with the topic of the thread....


I HATE POINTERS......
This bit i recently got working...

#####this bit works fine so far....
The 128 has 1 UART listening to the PC, the other listening to the SSC.
Whatever arrives from the PC is wrapped to the SSC and vice versa.
The 128 watches for servo position commands and keeps track of them in 32 integers. If the bot falls, it can tell which way the bot is lying and execute the correct sequence of stored procedures to get up.


####this bit im working on now so it may change#####
When the gyros indicate that the bot is leaning the 128 calculates how much the relevant servos need to be adjusted by and sends the commands to the SSC. Any further commands that arrive from the PC for the adjusted servos have the offset added or subtracted as they arrive....

My current problem is how to deal with the bot moving. I tried turning off gyros while walking / moving and switching on when a home position is recognised but that doesnt solve the problem of walking on uneven terrain...It also seems to defeat the point of gyros somewhat...

Anyway, sorry for the hi-jack....

More in keeping with the topic of the thread....


I HATE POINTERS......
PaulP
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 153
Joined: Fri Jan 19, 2007 1:00 am
Location: West Mids, United Kingdom

Post by Humanoido » Thu Apr 19, 2007 12:10 pm

Post by Humanoido
Thu Apr 19, 2007 12:10 pm

For walking up or down an inclined surface, the robot can use an accelerometer.

humanoido
For walking up or down an inclined surface, the robot can use an accelerometer.

humanoido
Humanoido
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 574
Joined: Tue Dec 05, 2006 1:00 am
Location: Deep in the Heart of Asia


12 postsPage 1 of 1
12 postsPage 1 of 1