Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Joystick.h
- Committer:
- kaiquedog
- Date:
- 2022-01-18
- Revision:
- 3:e4e890a46ff8
File content as of revision 3:e4e890a46ff8:
#ifndef JOYSTICK_H
#define JOYSTICK_H
#include "mbed.h"
class Joystick {
public:
Joystick(PinName vrx, PinName vry, PinName Sw);
/*
*******************************
**** DEFINIÇÕES DE FUNÇÕES ****
*******************************
*/
// Função que retorna o valor de VRX
int ler_x(); // 1 --> VRX > 800 || 0 --> VRX < 200
// Função que retorna o valor de VRX
int ler_y(); // 1 --> VRY > 800 || 0 --> VRY < 200
// Função que retorna 0 quando o botão for apertado
int bot_select();
/*
********************************
**** DEFINIÇÕES DE ENTRADAS ****
********************************
*/
AnalogIn VRX; // Entrada analógica VRX
AnalogIn VRY; // Entrada analógica VRX
DigitalIn Switch; // Entrada digital SW
};
#endif