i've messed around a little with the bs2 code for the geocrawler 4 project and would like to point out one flaw:

Get_Angle:
DeltaLong = -1 * DeltaLong 'reverse to conform with ArcTangent coordinate standards
DeltaLat = DeltaLat * (128 / 9999) 'adjust them so the max values are +- 128, to conform with ArcTangent standards.
DeltaLong = DeltaLong * (128 / 9999)
workVal = DeltaLong ATN DeltaLat ' reuse workVal (to save variable memory) to hold binary radian result of ArcTangent

RETURN

" (128 / 9999)" will return a decimal which of course the stamp cant handle so i replaced it with "DeltaLat = DeltaLat ** 839"
and it debugs a good number .before it would only debug "0". i have further modified the code to use the parallax servo controller and hope to do some test flghts in the next month or two when time/wheather allow

Views: 160

Reply to This

Replies to This Discussion

tell me more about the set up please , whats its intended purpouse?
Thank you for the helpful tip. The setup is only in its basic form at this point. But my intention is to develop an autopilot with data logging capabilites using a 3-axis accelerometer, a data logger from Parallax with a thumb drive, a temperature sensor (for fun), and a GPS. I am replacing the Basic stamp 2 with a basic stamp 2p for more speed and program capacity.

The fun part begins when I start integrating the system into my helicopter to control cyclic and collective with tail rotor control. Throttle control may come later.
Either of you guys have success with the Parallax GPS board? I'm having a devil of a time getting it to keep sats and I'm getting garbage data out with the Parallax GPS demo code. Do I have a bum board, or is this something you've seen too?
I haven't got to the GPS yet, does it have a way to plug in a external antenna? Is it getting enough voltage?


I just picked up a 2-axis mesmic accel today....working with it now.
Found the problem. Turns out that you can't put the GPS board on the dev board's breadboard because interference messes up its reception (instead, you can connect it with a long female-to-female servo cable to a servo port on the board). Also, you've got to change this line in the code--T4800 CON 188-- for whichever Basic Stamp you've got. For our BS2p, the 188 should be 500. For the BS2px it should be 813. Who knew?!?
You guys are way past this step, but I was reminded by your discussion to start a tutorial on setting up the hardware for this autopilot. The first post on that series is here.
Here are the promised hardware shots. I hope they help. Chris, please feel free to include these shots on your hardware series if you like.

Jim
Attachments:
The following attached is not for the GPS, but its a modification of the code demo from Parallax for the MESMIC 2-axis accellerometer. The code nulls out the effect of gravity in order to give you relative angle on the x and y axis.
Attachments:
Does anyone know how to use PUT and GET with the bs2p and share data among each program slot?
Yes, that's what we do in the "Initialize" program in the Basic Stamp autopilot. It's very straightforward, but you can't use any data in scratch RAM until you copy it into a variable with GET.
I still cannot get this to work and my programs do not seem to be switching back to slot 0 from slot 1 even if this is the only command I have in the slot 1 program. This is very odd.
Just so I'm clear, is the problem that you're not getting programs to switch back and forth from slot to slot, or that you're having trouble sharing data from scratch RAM between programs?

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service