Author Topic: Axon Getting Started Tutorial problem  (Read 3424 times)

0 Members and 1 Guest are viewing this topic.

Offline GertlexTopic starter

  • Supreme Robot
  • *****
  • Posts: 742
  • Helpful? 23
  • Nuclear Engineer Roboticist
Axon Getting Started Tutorial problem
« on: June 26, 2008, 10:53:07 AM »
Finally downloaded the necessary software...

In step five of part 1 ( http://www.societyofrobots.com/axon/axon_getting_started_software.shtml ), I am instructed to copy paste the contents of Axon.c into AVR Studio....

There isn't anywhere to paste such, and my screen matches the screenshot in the previous step to which Admin refers.  Mistake in the tutorial?

I went ahead and setup the rest and did the Build.  Initially I got an error:

Quote
gcc plug-in: Error: Object file not found on expected location C:\Documents and Settings\Eric\AVRStudio\Test01\Test01.elf
Make sure your makefile specifies the output .elf file as Test01.elf


So I made a copy of Axon.elf and renamed it Test01.elf, and was successful. (Edit: Test01 is the project name and such... Like I said, it worked :) )

Oh, btw, I was using the "Axon Source Code v1" ( http://www.societyofrobots.com/axon/axon_function_list.shtml ), rather than the photovore code... but I doubt that has anything to do with not having anywhere to paste text.

Thanks,
Gert
« Last Edit: June 26, 2008, 11:23:59 AM by Gertlex »
I

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
Re: Axon Getting Started Tutorial problem
« Reply #1 on: June 27, 2008, 12:24:40 PM »
I followed that tutorial and  what happened to me was that there was a windows that was titled photovore_v1 .

You do get some error message but I just ignored it and programmed the hex file and everything worked out fine.
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline GertlexTopic starter

  • Supreme Robot
  • *****
  • Posts: 742
  • Helpful? 23
  • Nuclear Engineer Roboticist
Re: Axon Getting Started Tutorial problem
« Reply #2 on: June 27, 2008, 02:31:18 PM »
I presume you mean a window within AVR Studio titled Photovore_v1?

I also have since imported Axon.c or whatever as a file and had no problems compiling there either.

I've yet to send code to the Axon... though I did finish making a custom power connector adapter earlier this afternoon.

*waits for admin*
I

Offline GertlexTopic starter

  • Supreme Robot
  • *****
  • Posts: 742
  • Helpful? 23
  • Nuclear Engineer Roboticist
Re: Axon Getting Started Tutorial problem
« Reply #3 on: June 27, 2008, 03:40:55 PM »
Hopefully my troubleshooting successes will help you, too, Admin ;)

I proceeded to the Hyperterminal testing, having finished the aforementioned power connector.\

Didn't work right off. I had to change a few things:
-After opening Axon.ht, disconnect
-Going to File, then properties, i had to manually set the "Connect using" to the correct port.  It was using the bluetooth serial port on my computer. (I think this must have defaulted correctly for you, as the "CP210x USB etc" was the only COM port in your Device Manager)
-Underneath that, clicked Configure, and I had to set the Baud rate there, too.  (Despite the settings being correct in Device Manager since yesterday)

This gave me regular output: "4" (at the wrong Baud rate, it would output something like "b" once)

Here's a pic of the power connector... DIY FTW :)


By the way: I had to take the whole power switch assembly apart and play with a multimeter for 20mins before feeling stupid and realizing how the circuitry is laid out in it... I bet I won't be the last.  Although my thoughts were prejudiced by the way I wanted to connect the whole thing: using both of the female wires.

And now to see Wall-E :D

Edit: Got the bootloader to work, using the axon_ser.hex file (servo centering prog for H2 pins)!! Whoo.
« Last Edit: June 27, 2008, 05:10:59 PM by Gertlex »
I

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Axon Getting Started Tutorial problem
« Reply #4 on: June 30, 2008, 09:49:55 AM »
Hmmmm garbage means that the baud simply isn't configured properly.

There is a chance I accidentally programmed the test program to be 38400bps, so just try each baud rate to see what happens. Make sure you also change the baud of the CP2102 in system properties. I'll recompile it when I get home.

If you program the Axon with the v1 Source code program, it will work fine.

I'll look into the other problems soon and improve the Axon tutorial to avoid more confusion.

Offline GertlexTopic starter

  • Supreme Robot
  • *****
  • Posts: 742
  • Helpful? 23
  • Nuclear Engineer Roboticist
Re: Axon Getting Started Tutorial problem
« Reply #5 on: June 30, 2008, 09:51:46 AM »
Oh, I should mention, I did manage to program the Axon a few days ago.  I'm a nub at this so far, but I have working code on the board that toggles the green led when i push the button :)... So I do know that I have the BAUD rate set correctly for the bootloader, at least.

Still working on figuring out rprintf, though.

I was using uartSendByte() for my earlier attempts at UART with the MiniSSC II.  My attempt to send three bytes looked like this:
Code: [Select]
while(1)
{
//control();//use this for your code
while(!button_pressed());
delay_ms(100);
if(light==1)
{
light = 0;
LED_off();
delay_ms(100);
uartSendByte(2,255);
delay_ms(100);
uartSendByte(2,0);
delay_ms(100);
uartSendByte(2,80);

}
else
{
light = 1;
LED_on();
delay_ms(100);
uartSendByte(2,255);
delay_ms(100);
uartSendByte(2,0);
delay_ms(100);
uartSendByte(2,40);

}

delay_cycles(100);//an optional small delay to prevent crazy oscillations
}

What I'm attempting there is to send 3 bytes. Sync Marker (255), Servo Number (0-254), Servo Position (0-254).

What would happen is that the Minissc would on random button presses receive a signal, but it always sends the correct servo to it's max position in the CC direction.  It even does this if I never send a Sync Marker value of 255 (i.e. 250 instead).  So it's partly working, but also showing behavior that shouldn't be possible.  (a second servo never gets moved)... Magical :)

I set the baud rate for UART2 by modifying the line early in the Axon.c source:
Code: [Select]
uartSetBaudRate(2, 9600); // set UARTH speedIs that all that needs to be changed for baud? (9600 is what my MiniSSC is set to, of course)

Edit: Doing some testing with rprintf... If I initialize uart1 and then uart2, only the later one works (i.e. the feedback being sent to hyperterminal doesn't go to uart1)  Is there a way around this other than re-initializing rprintf each time i change which output I'll send?

The fact that rprintf (and it's sibling functions) sends hex slightly confuses me: is hex readable by my MiniSSC.. i.e. is hex how these serial signals/bytes are always sent?
« Last Edit: June 30, 2008, 11:08:35 AM by Gertlex »
I

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Axon Getting Started Tutorial problem
« Reply #6 on: June 30, 2008, 08:44:22 PM »
Ok a few things . . .

The bootloader has autobaud capabilities, so if it works, that doesn't actually mean you have the baud set properly :P
(perhaps too fool proof, hehe)

Quote
I set the baud rate for UART2 by modifying the line early in the Axon.c source:

Code: [Select]
uartSetBaudRate(2, 9600); // set UARTH speedIs that all that needs to be changed for baud? (9600 is what my MiniSSC is set to, of course)

Yeap. You can also just call that line in control.c to overwrite it, too.

Quote
Doing some testing with rprintf... If I initialize uart1 and then uart2, only the later one works (i.e. the feedback being sent to hyperterminal doesn't go to uart1)  Is there a way around this other than re-initializing rprintf each time i change which output I'll send?

You will have to declare which UART you are using at any time anyway. This is the only line you need to declare it:
Code: [Select]
rprintfInit(uart0SendByte);//use UART0
rprintf("SoR Rulez");

Quote
i had to manually set the "Connect using" to the correct port.  It was using the bluetooth serial port on my computer. (I think this must have defaulted correctly for you, as the "CP210x USB etc" was the only COM port in your Device Manager)

Every computer is different so I cannot control for this unfortunately . . . I just updated the tutorial to help others with it.

Quote
Underneath that, clicked Configure, and I had to set the Baud rate there, too.  (Despite the settings being correct in Device Manager since yesterday)

Yea, you need to declare the correct baud in:
- the Axon software
- Hyperterminal to interpret the data
- Device Manager so the hardware will work

My bluetooth works without doing the last two steps, but the USB requires all of them. I recommend just sticking with one baud rate for everything so you don't need to worry about changing it. I usually use 38400bps.

Quote
By the way: I had to take the whole power switch assembly apart and play with a multimeter for 20mins before feeling stupid and realizing how the circuitry is laid out in it... I bet I won't be the last.  Although my thoughts were prejudiced by the way I wanted to connect the whole thing: using both of the female wires.

lol . . . I really need to make that Axon video to demonstrate this . . . I'll put up a temp video this week until I have more time to make a nicer one . . .

Quote
In step five of part 1 ( http://www.societyofrobots.com/axon/axon_getting_started_software.shtml ), I am instructed to copy paste the contents of Axon.c into AVR Studio....

There isn't anywhere to paste such, and my screen matches the screenshot in the previous step to which Admin refers.  Mistake in the tutorial?

Yea it was a bit confusing I think too. I just updated it, let me know if it makes sense now.


In other news, I was a moron and packaged/boxed all my assembled Axons so I can't test new code (too lazy to disconnect ERP, too) . . . I'll assemble some more tomorrow to make sure the baud stuff is done properly in my test hex files.

I think I answered all the questions . . . let me know if I missed any!

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Axon Getting Started Tutorial problem
« Reply #7 on: July 04, 2008, 10:08:18 AM »
Sorry for taking so long to get around to doing this!

I ran some tests, and apparently I messed up the baud rates in the preinstalled default test program . . . I just uploaded corrected test files that will work at 115.2k here:
http://www.societyofrobots.com/axon/axon_function_list.shtml#software

Just bootload those files to the Axon and it should work.

Offline GertlexTopic starter

  • Supreme Robot
  • *****
  • Posts: 742
  • Helpful? 23
  • Nuclear Engineer Roboticist
Re: Axon Getting Started Tutorial problem
« Reply #8 on: July 04, 2008, 10:14:14 AM »
Guess I"m a bit unclear as to what this fixes. (I also don't see any updated dates on the software page either)

Just to clarify, while I was getting gibberish with the preloaded software on the Axon, I get clear readable output with the Axon Source Code v1 in Hyperterminal.

I also haven't gotten minissc ii stuff working yet, but haven't really played around with it in the past few days either.  My plan while on vacation this coming week is to send serial data from Visual Basic 2005 on my computer to the axon, then send that data to hyptertrm.  I'll then know what data is being sent, and will attempt to mimic said data in sending commands to the Mini SSC.  Seems like it should work once I get the software working properly.  Any thoughts there? :)
I

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Axon Getting Started Tutorial problem
« Reply #9 on: July 04, 2008, 10:49:42 AM »
There wasn't actually anything 'broken' . . . the test files help you verify you set up the baud rates properly and identify any pins you may have accidently fried.

All Axons, before shipping, also get tested with these test programs. But I accidently put the wrong baud rate in that test program for the first 50 Axons I programmed . . .

I just corrected the dates on the test programs.

The best way to test your program is send the data to hyperterminal to know data is getting transferred properly to the MiniSSC.

Offline vidam

  • Supreme Robot
  • *****
  • Posts: 423
  • Helpful? 1
  • Robotronics.org
Re: Axon Getting Started Tutorial problem
« Reply #10 on: July 04, 2008, 01:09:50 PM »
Confused. I had the blackfin configured in firmware for 38400 baud because that is what you said the Axon firmware had set. Are you saying this is wrong and it should be 115.2k. I specifically went out of my way to  make sure this was the right baud rate when I ordered from you. Please don't tell me that you screwed this up?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Axon Getting Started Tutorial problem
« Reply #11 on: July 04, 2008, 01:52:25 PM »
uhhhh please reread my post Vidam . . . it was only the test program mis-configured . . . the Axon can have any normal baud rate you want . . .

Offline vidam

  • Supreme Robot
  • *****
  • Posts: 423
  • Helpful? 1
  • Robotronics.org
Re: Axon Getting Started Tutorial problem
« Reply #12 on: July 04, 2008, 02:33:27 PM »
Oh I got it. Sorry. I was stressing out. I don't want to burn any of my pins my first time around.   So the 38400 baud you told me was because it is what you have used in the Axon/Blackfin code you wrote. So it could have been any baud rate really for the Blackfin.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Axon Getting Started Tutorial problem
« Reply #13 on: July 04, 2008, 03:49:06 PM »
Quote
So the 38400 baud you told me was because it is what you have used in the Axon/Blackfin code you wrote. So it could have been any baud rate really for the Blackfin.
vidam, I told you in multiple threads, in two emails, its in the source code I sent you, and in the documentation I gave you . . .

its up to you to read it ;)

 


Get Your Ad Here