I've recently started a robotics club at my university. I have never really done any embedded programming before, so this is new to me. However, the language itself seems simple enough. I have several years of experience in software development, for money, so my technical background, on the whole, should be sufficient.
My main problem is just getting a feel for how this all works in detail.
My current goal is simply to send a pulse width modulated signal to a gyro to 'zero it out', as it were. And possibly receive/process such a message. However, my usual debug/learn incrementally approach doesn't work as well in the embedded world -- my box of tools is mostly for web, database, and mobile phone development.
Some advice on how to go about getting this stuff done would be immensely helpful. If you know of any tutorials that walk you through these sorts of things step by step, that'd be great. I do, honestly, need specific and practical information about pulse width modulated signals and how to send/receive them. The most complex thing I've done so far is make a couple of external LEDs blink back and forth on a bread board. Nothing too fancy.
I'm also having trouble selecting a gyro. As always, cost is a consideration...but I am willing to pay well for something that works, and is very well documented. We'd like something that's '2-axis', as it were -- where we can use the information about tilt in either direction to correct our balance/stabilize.
If you're hesitant, go ahead and puke something out even if you're not sure it's super helpful. Right now, even general information is much appreciated. And, of course, if you need more information from me to give me any advice, I'd be very appreciative if you did ask.
My current goal is simply to send a pulse width modulated signal to a gyro to 'zero it out', as it were
Can you explain what you mean by this?
See, I barely know what I mean by this. I think it works like this: The gyro has a point at which it is considered 'flat', if you will. At that point, it will not send any signal on it's output lines.
A pulse width modulated, if I understand it correctly, is basically a signal that is 'on' for a given portion of the time, and 'off' for a given portion of the time. This is used to get fine control of motors and other instruments by running them 'at full capacity', but only for microseconds at a time.
Groove:
However, my usual debug/learn incrementally approach doesn't work as well in the embedded world
Surely it works exactly the same - a mobile is embedded too, no?
Mobile phones are barely embedded. It's mostly a lot of XML for layouts and Java programming on the droid, which is what I use. The 'embedded' aspect of it has been abstracted away. Maybe it is similar, though. I suppose I'll know when more time is passed. Here's my real limitation: I don't know much about the instruments and tools used. A gyro? I didn't know what it was a month ago. Now, I kind of have an idea, but I still don't know how to actually interact with them in code. A pulse width modulated signal? My understanding is even fuzzier there. It's basically a rapidly fluctuating signal that is on and off for tiny periods of time in order to utilize something at partial capacity. I -think-.
Magician:
I think gyro is a "sensor", you can't send a command to a source.
Isn't it?
This is true. But you also need to be able to calibrate the gyro. I'm a real noob at this, but a gyro essentially tells you how far you are tilted from a given 'zero point'. The gyro, however, needs to know where that zero point actually is. They come with it set at a given point, but that doesn't mean that it's correct. Most accept a signal to tell them where the zero point is -- I am not familiar with actually using them, however, and no one I know really has the experience I can draw upon to figure out how to use them in a practical sense.
I suppose that what I really need is information on using gyros effectively. If I could get that down, it shouldn't be hard to control the motors. I've tinkered with it a bit, but I am just not having a progress-filled time, because I am pretty damned clueless on the matter.
If you know the name of gyro, you can find a data sheet , that will
give you info on how to use it, in details.
I can find it for you, if you provide a part names "XXXDDDDD"