Accceleromter. I need help.

I need help because I have a duty to do but I can not program the accelerometer.
here is my script :
#include <Arduino.h>
#include <Servo.h>
#include <Wire.h>
#include <MMA8653.h>
#include <MPU6050.h>
#include <IRremoteForStuduino.h>
#include <ColorSensor.h>
#include “Studuino.h”
#include “Wire.h”

Studuino board;

int xVal = board.GetAccelerometerValue(X_AXIS);
int yVal = board.GetAccelerometerValue(Y_AXIS);
int zVal = board.GetAccelerometerValue(Z_AXIS);

void setup()
{
Serial.begin(9600);
board.InitSensorPort(PORT_A4, PIDACCELEROMETER);
board.InitSensorPort(PORT_A5, PIDACCELEROMETER);
board.InitServomotorPort(PORT_D9);
board.InitServomotorPort(PORT_D10);
board.Servomotor(PORT_D11, 0);
board.InitServomotorPort(PORT_D12);
board.InitSensorPort(PORT_A0, PIDPUSHSWITCH);
}

void loop()
{
byte pVal = board.GetPushSwitchValue(PORT_A0);

Serial.print(“button:”); Serial.print(pVal); Serial.print("/t");
Serial.println(“x:”); Serial.println(xVal); Serial.println("/t");
Serial.println(“y:”); Serial.println(yVal); Serial.println("/t");
Serial.println(“z:”); Serial.println(zVal); Serial.println("/t");
board.Timer(100);

if(pVal==0){
board.Servomotor(PORT_D11,75);}
else(pVal==1);
board.Servomotor(PORT_D11,0);
if(yVal<955){
board.Servomotor(PORT_D9,0);}
if(yVal==1364){
board.Servomotor(PORT_D9,90);}
if(xVal==1364){
board.Servomotor(PORT_D12,90);
board.Servomotor(PORT_D10,90);}
if(zVal<716){
board.Servomotor(PORT_D12,170);
board.Servomotor(PORT_D10,5);}
if(zVal>776){
board.Servomotor(PORT_D9, 170);}}

thank you for helping me. :’(

What is the "duty" that you have to do?

Please read the How to use this forum post and follow the instructions to post sensibly. Use code tags when posting code.

I need help because I don’t know how to do it.
I can not program the accelerometer.
My goal is that depending on the angle of the accelerometer my robotic arm changes angle.

thank you for helping me.

manupulator_a_finir.ino (1.45 KB)

You’ve shown us your code twice, badly, but you haven’t told us what your problem is.

Slow down, think, and tell us what we need to know to help you, bearing in mind, we can’t see your project.