[C.CC USERS] AREF

Aaron Ryan bringfire at gmail.com
Sat Jun 23 16:32:19 BST 2012


Matt,

Great!...Yes, I have the research paper published on the Flying Gator and
was using that as a starting point...thanks for the link to the code in the
repository. I didn't even think to check there.

So, while it isn't "new", it still is the code
> that flew the actual aircraft.


It looks like many of my needs have already been written in a more
concurrent fashion than I would have written them, which is nice.

you can see where we do an ADC read; there's an umber of constants and
> channel arrays there, but put simply:
>    adc(GYRO.X, AREF, sig.gyro[X]?, gyro.out[X]!)



This was exactly what I was starting to write, and the channel arrays in
this PROC portend some questions in the near future.


note that you'll want to look at the *architecture specific* code (in
> the "arch" directory), because we had to do different things on the
> 328, 1280, and 2560 (as the ADC is hardware dependent).


I will pay attention to this...thanks for the heads-up.


On a side note, I am trying to wirelessly program the Arduino 328 with an
XBee series 1 radio...I have been able to send and receive serial data
using occam wirelessly after the Arduino is programmed, but I was hoping to
be able to program the board after it is embedded.

Have you ever tried this?

Thanks again for the quick response.

aaron





On Sat, Jun 23, 2012 at 7:54 AM, Matt Jadud <matt at jadud.com> wrote:

> Hi Aaron,
>
> On Sat, Jun 23, 2012 at 1:56 AM, Aaron Ryan <bringfire at gmail.com> wrote:
> > I am putting together an IMU with my two axis gyro and three axis
> > accelerometer. I was wondering if there is any way to implement an
> > "analogReference()" equivalent in occam.  I'm uncertain how the Atmega328
> > uses it's AREF pin, so any help on the simple concepts behind the
> function
> > will help...PORT info, etc..
>
> Actually, in the same place some of your code lives...
>
>
> http://projects.cs.kent.ac.uk/projects/kroc/svn/kroc/trunk/tvm/arduino/community/
>
> is the "gatoruav" directory. That is where the code for our UAV
> project lives. We spent the last year redesigning (and then
> redesigning again) the physical aircraft, and prototyping control code
> against a simulator. So, while it isn't "new", it still is the code
> that flew the actual aircraft.
>
> In the Trac browsing interface:
>
>
> http://projects.cs.kent.ac.uk/projects/kroc/trac/browser/kroc/trunk/tvm/arduino/community/gatoruav/
>
> you can see where we do an ADC read; there's an umber of constants and
> channel arrays there, but put simply:
>
>    adc(GYRO.X, AREF, sig.gyro[X]?, gyro.out[X]!)
>
> or, you can dig down into the Plumbing libraries, and find the ADC
> code there, which is more procedural (vs. concurrent):
>
>
> http://projects.cs.kent.ac.uk/projects/kroc/trac/browser/kroc/trunk/tvm/arduino/occam/include/arch/m328p/adc.module
>
> note that you'll want to look at the *architecture specific* code (in
> the "arch" directory), because we had to do different things on the
> 328, 1280, and 2560 (as the ADC is hardware dependent).
>
> If that doesn't get you started, please ask away. I guess the short
> answer is "Yes, AREF is a parameter to the ADC read call."
>
> Cheers,
> Matt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.concurrency.cc/pipermail/users/attachments/20120623/357b59db/attachment.htm>


More information about the users mailing list