When I import the library for the teleop module in combination with the tetrix prizm pro library to control my robot with a ps4 controller it causes an error:
/var/run/arduino/custom-libraries/TETRIX TELE-OP/TELEOP.cpp:9:10: fatal error: avr/wdt.h: No such file or directory
#include <avr/wdt.h>
^~~~~~~~~~~
compilation terminated.
I do not know what to make of this error code, here is my code, it is a sample code that I made to control forward and backward movements of a DC motor with a ps4 controller :
#include <TELEOP.h>
#include <Adafruit_NeoPixel.h>
#include <PRIZM_PRO.h>
#include <notes.h>
#include <pixelPatterns.h>
#include <soundEffects.h>
PRIZM prizm;
PS4 ps4;
/*
*/
void setup() {
prizm.PrizmBegin();
}
void loop() {
prizm.setMotorInvert(2,1);
prizm.setMotorInvert(3,1);
ps4.getPS4();
if(ps4.Button(UP)){
prizm.setMotorPower(1,100);
prizm.setMotorPower(2,100);
prizm.setMotorPower(3,100);
prizm.setMotorPower(4,100);
}
if(ps4.Button(DOWN)){
prizm.setMotorPower(1,-100);
prizm.setMotorPower(2,-100);
prizm.setMotorPower(3,-100);
prizm.setMotorPower(4,-100);
}
else{
prizm.setMotorPower(1,0);
prizm.setMotorPower(2,0);
prizm.setMotorPower(3,0);
prizm.setMotorPower(4,0);
}
}