|
|
@@ -0,0 +1,66 @@ |
|
|
|
|
|
|
|
///-------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
/// \file TactiloControllerPanda
|
|
|
|
/// \brief Classes of the Box Tactilo Controller.
|
|
|
|
/// \author Tobias Baumann (TH-Nürnberg).
|
|
|
|
/// \version 1.0.
|
|
|
|
/// \date Mon Feb 21 14:59:56 2022.
|
|
|
|
/// \copyright <a href="https://choosealicense.com/licenses/agpl-3.0/">GNU Affero General Public License v3.0</a>.
|
|
|
|
///
|
|
|
|
///-------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#define TAC1 7
|
|
|
|
#define TAC2 8
|
|
|
|
#define TAC3 9
|
|
|
|
#define TAC4 10
|
|
|
|
#define TAC5 11
|
|
|
|
#define TAC6 12
|
|
|
|
#define LED 13
|
|
|
|
|
|
|
|
void setup()
|
|
|
|
{
|
|
|
|
//init GPIOs
|
|
|
|
set_PinMode();
|
|
|
|
set_AllLow();
|
|
|
|
|
|
|
|
//init serial
|
|
|
|
Serial.begin(115200);
|
|
|
|
}
|
|
|
|
|
|
|
|
void loop()
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void set_PinMode()
|
|
|
|
{
|
|
|
|
//set all pins to OUTPUT
|
|
|
|
pinMode(TAC1, OUTPUT);
|
|
|
|
pinMode(TAC2, OUTPUT);
|
|
|
|
pinMode(TAC3, OUTPUT);
|
|
|
|
pinMode(TAC4, OUTPUT);
|
|
|
|
pinMode(TAC5, OUTPUT);
|
|
|
|
pinMode(TAC6, OUTPUT);
|
|
|
|
|
|
|
|
pinMode(LED, OUTPUT);
|
|
|
|
}
|
|
|
|
|
|
|
|
void set_AllLow()
|
|
|
|
{
|
|
|
|
//set all pins to LOW
|
|
|
|
digitalWrite(TAC1, LOW);
|
|
|
|
digitalWrite(TAC2, LOW);
|
|
|
|
digitalWrite(TAC3, LOW);
|
|
|
|
digitalWrite(TAC4, LOW);
|
|
|
|
digitalWrite(TAC5, LOW);
|
|
|
|
digitalWrite(TAC6, LOW);
|
|
|
|
|
|
|
|
digitalWrite(LED, LOW);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ToggleTactilos()
|
|
|
|
{
|
|
|
|
switch(
|
|
|
|
}
|