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
00001 #ifndef JOYSTICK_H 00002 #define JOYSTICK_H 00003 #include "mbed.h" 00004 00005 class Joystick { 00006 public: 00007 Joystick(PinName vrx, PinName vry, PinName Sw); 00008 /* 00009 ******************************* 00010 **** DEFINIÇÕES DE FUNÇÕES **** 00011 ******************************* 00012 */ 00013 // Função que retorna o valor de VRX 00014 int ler_x(); // 1 --> VRX > 800 || 0 --> VRX < 200 00015 00016 // Função que retorna o valor de VRX 00017 int ler_y(); // 1 --> VRY > 800 || 0 --> VRY < 200 00018 00019 // Função que retorna 0 quando o botão for apertado 00020 int bot_select(); 00021 00022 /* 00023 ******************************** 00024 **** DEFINIÇÕES DE ENTRADAS **** 00025 ******************************** 00026 */ 00027 AnalogIn VRX; // Entrada analógica VRX 00028 AnalogIn VRY; // Entrada analógica VRX 00029 DigitalIn Switch; // Entrada digital SW 00030 }; 00031 00032 #endif
Generated on Tue Sep 19 2023 16:42:48 by
