Arduino Sim Racing Library v1.1.5
Loading...
Searching...
No Matches
SimRacing.h File Reference

Header file for the Sim Racing Library. More...

#include <Arduino.h>

Go to the source code of this file.

Classes

class  SimRacing::DeviceConnection
 Used for tracking whether a device is connected to a specific pin and stable. More...
 
class  SimRacing::AnalogInput
 Handle I/O for analog (ADC) inputs. More...
 
struct  SimRacing::AnalogInput::Calibration
 Simple struct containing min/max values for axis calibration. More...
 
class  SimRacing::Peripheral
 Abstract class for all peripherals. More...
 
class  SimRacing::Pedals
 Base class for all pedals instances. More...
 
class  SimRacing::TwoPedals
 Pedal implementation for devices with only gas and brake. More...
 
class  SimRacing::ThreePedals
 Pedal implementation for devices with gas, brake, and clutch. More...
 
class  SimRacing::Shifter
 Base class for all shifter instances. More...
 
class  SimRacing::AnalogShifter
 Interface with shifters using two potentiometers for gear position. More...
 
struct  SimRacing::AnalogShifter::GearPosition
 Simple struct to store X/Y coordinates for the calibration function. More...
 
class  SimRacing::Handbrake
 Interface with analog handbrakes that use hall effect sensors. More...
 
class  SimRacing::LogitechPedals
 Interface with the Logitech pedals (Gas, Brake, and Clutch) More...
 
class  SimRacing::LogitechDrivingForceGT_Pedals
 Interface with the Logitech Driving Force GT pedals (Gas + Brake) More...
 
class  SimRacing::LogitechShifter
 Interface with the Logitech Driving Force shifter. More...
 

Macros

#define SHIFTER_SHIELD_V1_PINS   A1, A0, 14, A2
 Pin definitions for the Parts Not Included Logitech Shifter Shield, designed for the SparkFun Pro Micro:
 
#define PEDAL_SHIELD_V1_PINS   A2, A1, A0, 10
 Pin definitions for the Parts Not Included Logitech Pedals Shield, designed for the SparkFun Pro Micro:
 

Typedefs

using SimRacing::PinNum = int16_t
 Type alias for pin numbers, using Arduino numbering.
 

Enumerations

enum  SimRacing::Axis : uint8_t { SimRacing::X = 0 , SimRacing::Y = 1 }
 Enumeration for analog axis names, mapped to integers. More...
 
enum  SimRacing::Pedal {
  Gas = 0 , Accelerator = Gas , Throttle = Gas , Brake = 1 ,
  Clutch = 2
}
 Pedal ID names. More...
 

Variables

const PinNum SimRacing::UnusedPin = -1
 Dummy pin number signaling that a pin is unused and can be safely ignored.
 

Detailed Description

Header file for the Sim Racing Library.

Definition in file SimRacing.h.

Macro Definition Documentation

◆ PEDAL_SHIELD_V1_PINS

#define PEDAL_SHIELD_V1_PINS   A2, A1, A0, 10

Pin definitions for the Parts Not Included Logitech Pedals Shield, designed for the SparkFun Pro Micro:

  • Gas Wiper: A2
  • Brake Wiper: A1
  • Clutch Wiper: A0
  • Detect Pin: 10

This macro can be inserted directly into the constructor in place of the normal pin definitions:

#define PEDAL_SHIELD_V1_PINS
Pin definitions for the Parts Not Included Logitech Pedals Shield, designed for the SparkFun Pro Micr...
Definition SimRacing.h:829
Interface with the Logitech pedals (Gas, Brake, and Clutch)
Definition SimRacing.h:760

Definition at line 829 of file SimRacing.h.

◆ SHIFTER_SHIELD_V1_PINS

#define SHIFTER_SHIELD_V1_PINS   A1, A0, 14, A2

Pin definitions for the Parts Not Included Logitech Shifter Shield, designed for the SparkFun Pro Micro:

  • X Wiper: A1
  • Y Wiper: A0
  • Reverse Pin: 14
  • Detect Pin: A2

This macro can be inserted directly into the constructor in place of the normal pin definitions:

#define SHIFTER_SHIELD_V1_PINS
Pin definitions for the Parts Not Included Logitech Shifter Shield, designed for the SparkFun Pro Mic...
Definition SimRacing.h:811
Interface with the Logitech Driving Force shifter.
Definition SimRacing.h:787

Definition at line 811 of file SimRacing.h.

Typedef Documentation

◆ PinNum

using SimRacing::PinNum = int16_t

Type alias for pin numbers, using Arduino numbering.

Definition at line 37 of file SimRacing.h.

Enumeration Type Documentation

◆ Axis

enum SimRacing::Axis : uint8_t

Enumeration for analog axis names, mapped to integers.

Enumerator

Cartesian X axis.

Cartesian Y axis.

Definition at line 49 of file SimRacing.h.

Variable Documentation

◆ UnusedPin

const PinNum SimRacing::UnusedPin = -1

Dummy pin number signaling that a pin is unused and can be safely ignored.

Definition at line 43 of file SimRacing.h.