Lynxmotion Tech Support

www.lynxmotion.com
It is currently Wed May 22, 2013 9:46 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 504 posts ]  Go to page Previous  1 ... 30, 31, 32, 33, 34
Author Message
PostPosted: Tue Oct 18, 2011 2:49 am 
Offline
Superguru of Robotics!!!
User avatar

Joined: Wed Nov 28, 2007 7:48 am
Posts: 1141
Location: Netherlands
kurte wrote:
Hi Xan,

The comments/defines in the code are pretty current for which IO pins are used for what:
Code:
;==============================================================================
; [IO Definitions] Lets define what each IO line is used for.
;==============================================================================
;   p0, left vertical joystick
;   p1, left horizontal joystick
;   p2, right vertical joystick
;   p3, right horizontal joystick
;   in4                - Col1 on keypad
;   in5                - Col2 "
;   in6                - Col3 "
;   in7                - Col4 "
Display    con 8             ; LCD Display
'Speaker    con 9             ; Speaker; Disable speaker when used extra pot meter
Row0          con 10             ; Row 0 on keypad
Row1          con 11             ; row 1 on keypad
Row2       con 12             ; Row 2
Row3       con 13             ; Row 3
; P14 RXD                  ; HSERIAL
; P15 TXD                  ; hserial
RowB      con   9            ; Cmd buttons new row , XP: ex-speaker
;   p18                  - Left slider
;   p19                - Right slider
;   p16   (AX0)            - XP (eXtra potmeter), Left potmeter
;   p17   (AX1)            - XP (eXtra potmeter), Right potmeter

Note: in the above I removed the #ifdef for the extra pots as both Zenta's and my remote are configured this way. So as you can see we used up every IO pin including the speaker.

I'm glad I asked... In this same topic, post 46 you came up with the idea about how to connect the extra command buttons. The only thing is that the drawing shows an extra column on P17. And the commend in the code (like above) shows an extra row on P9. This got me confused.
But row it is then. A row doesn't need an extra resistor though.

A Arduino Mega would be cool to try. But since you guys are still in the prototype stage I'm thinking of a solution for in the meanwhile. :)

Thanks for the help!

Xan

_________________
[b]Share, Use and Improve![/b]
Digging trough: [i]Theory of Applied Robotics: Kinematics, Dynamics, and Control[/i]
Xan's YouTube Channel
http://www.youtube.com/xanore


Top
 Profile  
 
PostPosted: Tue Oct 18, 2011 8:04 am 
Offline
Robot Guru
User avatar

Joined: Sat Apr 15, 2006 1:42 pm
Posts: 4414
Yep, Zenta moved the extra row to P9 so he would have the Analog capable pin P17... Yep, did not need extra resistor.

As you mentioned, the Arduino version is a prototype, but aren't they all :D As I mentioned, it should not be hard to to convert to Arc32, but have not tried.

Kurt


Top
 Profile  
 
PostPosted: Tue Oct 25, 2011 3:09 pm 
Offline
Superguru of Robotics!!!
User avatar

Joined: Wed Nov 28, 2007 7:48 am
Posts: 1141
Location: Netherlands
Hi Kurt,

I've got the buttons connected and am able to scan, and actually find, the other modules.

I'm still a bit confused about the function of the buttons and the structure of the menu. But I'm sure you (or Zenta) can clarify it for me :)

The 4 buttons are marked X, Y, Y and Z. If I got it right the layout is:
bit 0 = W = esc
bit 1 = X = enter
bit 2 = Y = down
bit 3 = Z = up

Here come my noob questions:
If I'm in the home screen and push the down button I loop trough the following entries
home -> Cal Joystics Move Full Ranges -> Current My: 0000 -> Current DL: 0003 THEX New: -> Select By Name -> Right: 128 128 ->home

home
Home screen showing normal values

Cal Joystics Move Full Ranges
How does this work? I can move all joysticks, buttons but nothing happens. Only if I hit X (enter) I get *** Error ***s

Current My: 0000
This screen is a bit mixed up. I've got a lot of non-ASCII chars in there. No idea why. Maybe it is reading something for memory which is corrupted?

Current DL: 0003 THEX New:
This shows the current selected XBEE module. Can it do something else? What's the "New:" for?

Select by name
This is where I can scan for modules and select the XBEE module
A - Scan modules
D - Delete
RJoy - scroll found XBEE modules
Enter - Select XBEE module

Right 128 128
What does this menu item do? It seems to show the left or right joystick values. Both my left and right joysticks are not totally stable in the home position so this screen keeps jumping between left and right.

Thanks! Xan

_________________
[b]Share, Use and Improve![/b]
Digging trough: [i]Theory of Applied Robotics: Kinematics, Dynamics, and Control[/i]
Xan's YouTube Channel
http://www.youtube.com/xanore


Top
 Profile  
 
PostPosted: Tue Oct 25, 2011 3:17 pm 
Offline
Robot Guru
User avatar

Joined: Sat Apr 15, 2006 1:42 pm
Posts: 4414
Hi Xan,

Note the Esc, button I don't think has been used...

Calibrate... You need to move both joysticks to their sort-of max extents in both X and Y directions. Note: I often don't diagonalsnals here as I want the straight up top to be the maximum value... You also need to move the sliders to their minimums and maximums. The code checks to see if all of these values are above or below some certthresholdsolds.

Current My: is whatever 16 bit hex value you want. If you are seeing corrupted characters on this display, it is probably because the interrupts are screwing up the text... Will need to look sometime. Note: 0 usually works fine.

Current DL: This was originally the only way to choose a robot. You had to know it's hex MY value and then enter that into the keypad. But for the most part, I use the Select by Name for the majority of the time.

Right 128 128 - Is often the standard display. That is, if you move the right joy stick you will see values for the right joy stick. If you move the Left joystick, the word right will turn to left and show the values for the left joystick. Likewise for sliders. This freed up the 2nd line of the display to show things, that are sent back from the robot, like what the new gait is or the like.

Kurt


Top
 Profile  
 
PostPosted: Tue Oct 25, 2011 3:41 pm 
Offline
Superguru of Robotics!!!
User avatar

Joined: Wed Nov 28, 2007 7:48 am
Posts: 1141
Location: Netherlands
Hi Kurt,

Thanks for the extreme quick answers! :D

Calibrate: If I got it correctly I only need to move both joysticks to the maximum positions to calibrate them. No need to confirm the movements then. Can you tell me why enter gives me an error?

Current my: Clear, this is the XBEE MY setting (16-bits source address). Need to check the interrupt stuff for the display mixup

Current DL: Clear, works like a charm!

Right 128 128: this doesn't work for me since the display is still blinking to "left". This might need a threshold.

Awesome work! I will try to get THex to walk now ;)

Xan

_________________
[b]Share, Use and Improve![/b]
Digging trough: [i]Theory of Applied Robotics: Kinematics, Dynamics, and Control[/i]
Xan's YouTube Channel
http://www.youtube.com/xanore


Top
 Profile  
 
PostPosted: Tue Oct 25, 2011 6:56 pm 
Offline
Robot Guru
User avatar

Joined: Sat Apr 15, 2006 1:42 pm
Posts: 4414
Calibrate, you do need to hit enter, if it is saying error, than one of the Analog inputs has not been moved through enough for it to be happy. Usually I forget to do the Sliders.

A quick look at the code, it expects that thanalogog inputs on pins:
AtoDOrder bytetable 3, 2, 1, 0, 19, 18

have been moved through the range. It sort of assumes the first 4 are the joysticks of our DIY controls and don't have a full range 0-1024, so it assumes the minimum for these must be < 450 and the maxs must be > 575. It assumes the sliders have a larger range and the min must be < 50 and the max > 975. These should be table driven, but...

If the Right ... is not working, how about the amain page, do all of the values appear to change properly?

Got to run
Kurt


Top
 Profile  
 
PostPosted: Tue Nov 08, 2011 4:35 pm 
Offline
Superguru of Robotics!!!
User avatar

Joined: Wed Nov 28, 2007 7:48 am
Posts: 1141
Location: Netherlands
Hi Kurt,

I've got the communication running with help of your XBEE THex version you've posted. I left something in for the PS2 remote which caused all the problems. :oops:

Now, when I turn on the THex it will start walking automatically. So I started to dig deeper in to your DIY remote XBEE code. While fiddling around with the code, I got the strangest compiler error of all...

When I enable the DEBUG = 1 variable in the "diy transmitter.bas" file. (remove the ') The compiler gives an error

Build
Code:
Preparing files...
D:\DIY\XBEE_TASERIAL_DEFINES.BAS
D:\DIY\DIY TRANSMITTER.BAS
D:\DIY\XBEE_TASERIAL_SUPPORT.BAS
Compiling...
Linking...
C:\Program Files\BasicMicro\Basic Micro Studio\bin\ld.exe : region text is full (d:\diy\diy transmitter.bas section .text
Errors Detected
When I double click on the error line, the Workspace opens an extra file "ld.exe" with the text "MZ" in it. When disable the DEBUG variable again, the program builds like a charm.

Did you see this behavior before?

Thanks, Xan

_________________
[b]Share, Use and Improve![/b]
Digging trough: [i]Theory of Applied Robotics: Kinematics, Dynamics, and Control[/i]
Xan's YouTube Channel
http://www.youtube.com/xanore


Top
 Profile  
 
PostPosted: Tue Nov 08, 2011 4:47 pm 
Online
Robot Guru
User avatar

Joined: Thu Nov 09, 2006 5:46 am
Posts: 2078
Location: Norway
Hi,

I'm not sure but I think I've seen something similar. You are not running out of memory space on the BAP28? Just a guess..

EDIT: http://www.lynxmotion.net/viewtopic.php?f=4&t=5463&p=62063&hilit=region+text+is+full#p62063

_________________
[b]Kåre Halvorsen, Zenta[/b]
-----------------------------------------
Zenta's blog
http://zentasrobots.com/
Zenta's YouTube channel
http://www.youtube.com/ZentaOlbaid
-----------------------------------------


Top
 Profile  
 
PostPosted: Tue Nov 08, 2011 5:09 pm 
Offline
Superguru of Robotics!!!
User avatar

Joined: Wed Nov 28, 2007 7:48 am
Posts: 1141
Location: Netherlands
Ah I see, This explains a lot.

Thanks! :)

Just sucessfully calibrated the remote. Nice Piece of programming work Kurt!
The THex still is walking on it's own. I'll hook up my logic analyzer Thursday to see what's going over the "line". Now it's time to go to bed (23:20 alread :( )

_________________
[b]Share, Use and Improve![/b]
Digging trough: [i]Theory of Applied Robotics: Kinematics, Dynamics, and Control[/i]
Xan's YouTube Channel
http://www.youtube.com/xanore


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 504 posts ]  Go to page Previous  1 ... 30, 31, 32, 33, 34

All times are UTC - 6 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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group