Arduino and Servo Control Using Accelerometer ADXL345

posted in: Arduino | 13

Download # Arduino Code (*.ino file)

Download # ADXL345 library (*.rar file)
or
Upload Arduino code directly to your Microcontroller from website
If you want to integrate Arduino IDE into your website (as above) sign up here: codebender
 

13 Responses

  1. vimal

    sketch_aug14b:32: error: ‘ADXL345’ does not name a type
    sketch_aug14b.ino: In function ‘void setup()’:
    sketch_aug14b:40: error: ‘adxl’ was not declared in this scope
    sketch_aug14b.ino: In function ‘void loop()’:
    sketch_aug14b:46: error: ‘adxl’ was not declared in this scope

    pls any one say how to solve this error…?
    i just download the library and paste it …still im getting this error… what i have to do…
    reply as soon as possiable

    • admin

      Are you sure you copied library in the right direction? Could you paste me a path to this library?
      After you copied library did you restart the Arduino itself?

  2. roberto

    I am having the same problem after checking it in error this variable :
    ADXL345 adxl; //variable adxl is an instance of the ADXL345 library

    Arduino_AccelerometerADXL345_Servos:32: error: ‘ADXL345’ does not name a type
    Arduino_AccelerometerADXL345_Servos.ino: In function ‘void setup()’:
    Arduino_AccelerometerADXL345_Servos:40: error: ‘adxl’ was not declared in this scope
    Arduino_AccelerometerADXL345_Servos.ino: In function ‘void loop()’:
    Arduino_AccelerometerADXL345_Servos:46: error: ‘adxl’ was not declared in this scope

    Can speak step by step how to resolve this error?

  3. roberto

    hello when I move the fast sensor, servo motor lock and does not follow the movement, and is making a noise (tec tec tec) in the servo motor, and then resetting it back to normal, you can say what can be ?
    I’m using servomotor Towerpro MG946R direct 5v power by the Arduino.

  4. herice

    Hello! good day!I am a beginner and i need your help please help me. I downloaded ur code ,i have the adxl345 3-axis digital acceleromter and 2 Servo motors. i connected the ryt connections u’ve indicated above. But like other reviews say, there are some errors….what should i do sir? and where should i start…..i dont understand the library stuffs u mentioned..what library is it?where could i find it??and where to copy

    • admin

      Hi, from 0 to 12 seconds in the video, I’ve shown where to put the library folder. Do it so, and use the code. Good luck.

  5. Frank

    should be

    void loop() {
    int x,y,z;
    adxl.readXYZ(&x, &y, &z); //read the accelerometer values and store them in variables x,y,z

    worked great after I changed it

  6. yadav

    Hey admin im using arduino uno wifi ,it does not seem to work with this , do i have to change the code , as im a beginner to this can you help me…..

Leave a Reply

Your email address will not be published. Required fields are marked *