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

Thread: Teensy LC + GY-6500+2 servos

  1. #1
    Member
    Join Date
    May 2016
    Location
    MIDDLE OF THE WORLD
    Posts
    36

    Teensy LC + GY-6500+2 servos

    First I don't know where to put this for the help I'm looking for. I'm trying to create a cosplay tail that will react as I walk or with button presses. I own a GY-6500/mpu6500 tilt sensor and looking into buying servos and a teensy LC.

    I know the teensy can read I2C the tilt sensor uses but the code is where I have issue. I'm looking for like example code for both reading I2C from the tilt sensor, how to drive a servo, and /or how to read button presses. Lets say I have been out of coding with a teensy for years and I need to brush up on it again.

    The picture is of how logically I think it would run.
    Click image for larger version. 

Name:	tail.png 
Views:	14 
Size:	9.2 KB 
ID:	25930

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,722
    I am not sure about that sensor... is it a MPU6500 which I did not see anything on or a MPU6050. Assuming the later there are a few libraries out there you can install for it.
    Do a search on it. For example in Arduino IDE you can do a search under Tools->Manage Libraries and you will see a few including one from Adafruit... You can try installing one of those and see if it can properly read your sensor.

    Servos: Depends... What type? Like RC servos? Or Dynamixels, or LSS or ... Assuming RC, then there are a few libraries available like Servo to help there.

    Buttons. I would probably look at the bounce library that installs with Teensyduino. There are example sketches that show how to use.

    Good luck.

  3. #3
    Member
    Join Date
    May 2016
    Location
    MIDDLE OF THE WORLD
    Posts
    36
    I was having hard time finding links to libraries and example code. The tilt sensor might be under mpu9265 (the one linked here is the extract one I own) as well. As for servo I was looking into HS-5645MG. I just need links to what I need for now.
    Last edited by Demonclaw; 09-22-2021 at 04:34 PM.

  4. #4
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,722
    Sorry I don't know anything about these... But did find a library: https://github.com/rpicopter/ArduinoMotionSensorExample
    That was mentioned up on the Arduino forum: https://forum.arduino.cc/t/mpu6050-m...ver-i2c/235827

Posting Permissions

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