Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: MMA7361 Accelerometer & Teensy 3

  1. #1

    Question MMA7361 Accelerometer & Teensy 3

    Hi,

    I have a Triple Axis Accelerometer Breakout - MMA7361 and want to use it as some of my joystick axis. As I am new to this I just wanted to check my connections...

    VCC ---> 3V on Teensy 3
    GND ---> AGND on Teensy 3
    X,Y,ZOUT ---> A0-A2 on Teensy 3
    SLP ---> Suitable Digital Pin on Teensy 3
    GSEL ---> Suitable Digital Pin on Teensy 3
    0GD ---> Suitable Digital Pin on Teensy 3 (probably wont use this)
    ST ---> NC

    The SLP needs to be pulled high for the device to work, and GSEL need to be high to select 6G mode. Can I just connect these pins directly to the Teensy 3 or would I need to use a resistor? I am also assuming that I should be using AGND instead of GND, is this correct?

    Thanks in advance,

    Les

  2. #2
    Senior Member
    Join Date
    Nov 2012
    Location
    Los Angeles
    Posts
    125
    You probably don't even need to waste any digital pins on the T3 if you don't plan on messing with the GSEL and SLP pins (i.e. they will always be high). You should be able to tie those directly to the 3V3 on the teensy as well. That's what I would do, at least

    David

  3. #3
    Quote Originally Posted by virtualdave View Post
    You probably don't even need to waste any digital pins on the T3 if you don't plan on messing with the GSEL and SLP pins (i.e. they will always be high). You should be able to tie those directly to the 3V3 on the teensy as well. That's what I would do, at least

    David
    Thanks for the reply.

    I have plenty of spare pins as I am only using 13 buttons, so I think I may as well connect them. It may be that I want to convert this to wireless in the future, so the sleep control would be useful.

    Regards,

    Les

  4. #4
    Senior Member
    Join Date
    Nov 2012
    Location
    Los Angeles
    Posts
    125
    Good point! Your proposed set up looks good to me.
    Cheers,
    David

  5. #5
    Just wondered whether the MMA7361 GND should be connected to AGND or GND? I don't seem to be getting the full X & Y axis movements in the game controller settings window with AGND. I should probably double check my code and also see what values the accelerometer is putting out, but I just thought I'd ask anyway.

    Regards,

    Les

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,041
    Either GND or AGND should work. AGND might give a slight cleaner signal if you've controlling digital stuff like blinking LEDs, which of course you would not connect to AGND.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •